From c2da0102748883d9e60fa1a98a2b0658ac5cc211 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 25 Feb 2024 01:36:28 -0600 Subject: refactor: only use ruff-lsp, tidy up lsp configs --- lua/plugins/lspconfig.lua | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'lua/plugins/lspconfig.lua') diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 3390b51..304bc5c 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -16,6 +16,14 @@ local servers = { allFeatures = true, }, }, + ruff_lsp = { + init_options = { + settings = { + -- Any extra CLI arguments for `ruff` go here. + args = {}, + } + } + }, pyright = {}, lua_ls = { Lua = { @@ -43,8 +51,7 @@ return { 'gopls', 'rust-analyzer', 'mypy', - 'ruff', - 'autopep8', + 'ruff-lsp', 'pyright', 'lua-language-server', }, @@ -142,10 +149,22 @@ return { }) end - setup_server('clangd') + -- setup_server('clangd') + lspconfig['clangd'].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = servers['clangd'], + cmd = { + 'clangd', + -- fixes: multiple different client offset_encodings detected + '--offset-encoding=utf-16', + }, + }) + setup_server('gopls') setup_server('rust_analyzer') setup_server('pyright') + setup_server('ruff_lsp') setup_server('lua_ls') -- change the gdscript cmd for wsl -> win support, need to set: -- cmd = { 'nc', '172.30.112.1', '6005' }, but the ip changes dynamically -- cgit v1.2.3-70-g09d2