From be59c986be0af705157a7169a745bf235d960ee4 Mon Sep 17 00:00:00 2001 From: dlond Date: Thu, 22 May 2025 18:13:57 +1200 Subject: [PATCH] trying to add clangd and cmake lsps p 2 --- lua/custom/plugins/lsp.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/custom/plugins/lsp.lua b/lua/custom/plugins/lsp.lua index ec02e830..bd68b384 100644 --- a/lua/custom/plugins/lsp.lua +++ b/lua/custom/plugins/lsp.lua @@ -36,8 +36,9 @@ return { }, }, clangd = { - cmd = { 'clangd', '--compile-commands-dir=build' }, - root_dir = require('lspconfig.util').root_pattern('CMakeLists.tst', '.git'), + cmd = { 'clangd' }, + filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }, + root_dir = require('lspconfig.util').root_pattern('CMakeLists.txt', '.git'), }, pyright = { settings = { @@ -56,9 +57,9 @@ return { ruff = {}, texlab = {}, cmake = { - cmd = { 'cmake-language-server', '--stdio' }, + cmd = { 'cmake-language-server' }, filetypes = { 'cmake' }, - root_dir = require('lspconfig.util').root_pattern('CMakeLists.tst', '.git'), + root_dir = require('lspconfig.util').root_pattern('CMakeLists.txt', '.git'), }, }