add some bugs

This commit is contained in:
dlond 2025-05-27 03:50:02 +12:00
parent 0a859f314e
commit 2113b33a58
4 changed files with 62 additions and 9 deletions

View file

@ -13,8 +13,6 @@ return {
'hrsh7th/cmp-nvim-lsp', -- LSP completion source for nvim-cmp
},
config = function(_, opts)
-- local query_driver = vim.fn.trim(vim.fn.system 'which clang++')
-- local resource_dir = vim.fn.trim(vim.fn.system 'clang++ --print-resource-dir')
-- This config function runs AFTER the plugin and its dependencies are loaded.
-- It sets up the LSP servers.
@ -23,6 +21,8 @@ return {
-- Define the list of LSP servers you want to configure.
-- These servers must be installed via Nix/Home Manager and be in your PATH.
local utils = require 'custom.utils'
local target = utils:get_target()
local servers = {
lua_ls = {
-- cmd = { ... }
@ -38,12 +38,7 @@ return {
},
},
clangd = {
cmd = {
'clangd',
'--compile-commands-dir=build/debug',
'--query-driver=' .. vim.fn.trim(vim.fn.system 'which clang++'),
'--resource-dir=' .. vim.fn.trim(vim.fn.system 'clang++ --print-resource-dir'),
},
cmd = utils.make_clangd_cmd(target),
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
root_dir = require('lspconfig.util').root_pattern('CMakeLists.txt', '.git'),
},