trying to add clangd and cmake lsps
This commit is contained in:
parent
e9c8f49891
commit
abed9bdabc
|
@ -9,8 +9,6 @@ return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
event = { 'BufReadPre', 'BufNewFile' }, -- Load LSP config early
|
event = { 'BufReadPre', 'BufNewFile' }, -- Load LSP config early
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Dependencies for nvim-lspconfig itself, if any.
|
|
||||||
-- Mason and mason-lspconfig are removed as Nix handles LSP installation.
|
|
||||||
{ 'j-hui/fidget.nvim', opts = {} }, -- Useful status updates for LSP
|
{ 'j-hui/fidget.nvim', opts = {} }, -- Useful status updates for LSP
|
||||||
'hrsh7th/cmp-nvim-lsp', -- LSP completion source for nvim-cmp
|
'hrsh7th/cmp-nvim-lsp', -- LSP completion source for nvim-cmp
|
||||||
},
|
},
|
||||||
|
@ -38,7 +36,8 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
clangd = {
|
clangd = {
|
||||||
root_dir = require('lspconfig.util').root_pattern('compile_commands.json', '.git', '.clangd'), -- Helps find project root
|
cmd = { 'clangd', '--compile-commands-dir=build' },
|
||||||
|
root_dir = require('lspconfig.util').root_pattern('CMakeLists.tst', '.git'),
|
||||||
},
|
},
|
||||||
pyright = {
|
pyright = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -56,9 +55,11 @@ return {
|
||||||
nixd = {},
|
nixd = {},
|
||||||
ruff = {},
|
ruff = {},
|
||||||
texlab = {},
|
texlab = {},
|
||||||
-- Add other servers like "bashls", "yamlls", "gopls", "rust_analyzer" etc.
|
cmake = {
|
||||||
-- Ensure the corresponding packages (e.g., pkgs.bash-language-server)
|
cmd = { 'cmake-language-server', '--stdio' },
|
||||||
-- are in your Home Manager home.packages list.
|
filetypes = { 'cmake' },
|
||||||
|
root_dir = require('lspconfig.util').root_pattern('CMakeLists.tst', '.git'),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Iterate through the defined servers list and set them up with lspconfig
|
-- Iterate through the defined servers list and set them up with lspconfig
|
||||||
|
|
|
@ -8,7 +8,6 @@ return {
|
||||||
-- main = 'nvim-treesitter.configs', -- Keep if needed from kickstart
|
-- main = 'nvim-treesitter.configs', -- Keep if needed from kickstart
|
||||||
opts = { -- Use opts to merge/override defaults
|
opts = { -- Use opts to merge/override defaults
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
-- List ALL parsers you want installed based on your previous config
|
|
||||||
'bash',
|
'bash',
|
||||||
'c',
|
'c',
|
||||||
'cmake',
|
'cmake',
|
||||||
|
@ -20,16 +19,14 @@ return {
|
||||||
'make',
|
'make',
|
||||||
'markdown',
|
'markdown',
|
||||||
'markdown_inline',
|
'markdown_inline',
|
||||||
'nix', -- Added based on previous diff
|
'nix',
|
||||||
'python', -- Added based on previous diff
|
'python',
|
||||||
'query',
|
'query',
|
||||||
'vim',
|
'vim',
|
||||||
'vimdoc',
|
'vimdoc',
|
||||||
'yaml', -- Added based on previous diff
|
'yaml',
|
||||||
-- Add any others you commonly use
|
|
||||||
},
|
},
|
||||||
-- Autoinstall languages that are not installed
|
auto_install = true,
|
||||||
auto_install = true, -- Keep kickstart's default or set as desired
|
|
||||||
|
|
||||||
-- Keep other kickstart defaults like highlight/indent settings unless you want to change them
|
-- Keep other kickstart defaults like highlight/indent settings unless you want to change them
|
||||||
highlight = {
|
highlight = {
|
||||||
|
|
Loading…
Reference in New Issue