diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-08-04 00:57:35 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-08-04 00:57:35 +0300 |
| commit | 7014dac58b65e0becb304cb7c220ee04ac1ab4c2 (patch) | |
| tree | 34034f3eff0d163fd4d31a7cd4d714ca4e99a32d /.config | |
| parent | 19bad5d6572c94c5f9f595b142512fb49479a209 (diff) | |
feat(nvim): configured clangd lsp (and minor tweaks to luals)
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/lua/custom/config/language-servers.lua | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/.config/nvim/lua/custom/config/language-servers.lua b/.config/nvim/lua/custom/config/language-servers.lua index 763a712..a88258d 100644 --- a/.config/nvim/lua/custom/config/language-servers.lua +++ b/.config/nvim/lua/custom/config/language-servers.lua @@ -1,11 +1,10 @@ --- NOTE: A list of language servers (and potentially their config) --- Accepts either true to enable, false to disable or a table with settings +-- NOTE: a table or true to enable, false to disable return { lua_ls = { settings = { - diagnostics = { - globals = { 'vim' }, - }, + diagnostics = { globals = { 'vim' } }, + telemetry = { enabled = false }, + hint = { enable = true }, workspace = { library = { [vim.fn.expand('$VIMRUNTIME/lua')] = true, @@ -14,10 +13,17 @@ return { }, }, }, -- lua - clangd = true, -- C/C++ - gradle_ls = true, -- java package manager - -- jdtls = true, -- java eclipse lsp - kotlin_language_server = true, -- kotlin + clangd = { + cmd = { 'clangd', '--clang-tidy' }, + root_dir = function(fname) + return require('lspconfig/util').root_pattern( + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + '.git' + )(fname) or vim.fn.getcwd() + end, + }, -- c/cpp pyright = { settings = { python = { @@ -25,17 +31,12 @@ return { }, }, }, -- python - rust_analyzer = false, -- NOTE: using rustaceanvim bashls = true, -- bash taplo = true, -- toml lemminx = true, -- xml yamlls = true, -- yaml jsonls = true, -- json - - -- For CS50x, sorry for everyone who sees this - -- FIX: this should be removed ASAP - html = true, - cssls = true, - eslint = true, - tsserver = true, + html = true, -- html + cssls = true, -- css + tsserver = true, -- javascript/typescript } |
