diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2024-02-25 01:36:28 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2024-02-25 01:36:28 -0600 |
commit | c2da0102748883d9e60fa1a98a2b0658ac5cc211 (patch) | |
tree | 0adbf8e8ec2179d8cce5a98afcf6036018bc6e08 /lua/plugins | |
parent | b87090c9527d4190ce1dc391f4cee983263f4853 (diff) |
refactor: only use ruff-lsp, tidy up lsp configs
Diffstat (limited to 'lua/plugins')
-rw-r--r-- | lua/plugins/lspconfig.lua | 25 | ||||
-rw-r--r-- | lua/plugins/null-ls.lua | 5 |
2 files changed, 25 insertions, 5 deletions
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 diff --git a/lua/plugins/null-ls.lua b/lua/plugins/null-ls.lua index 91f94e6..c1d77c7 100644 --- a/lua/plugins/null-ls.lua +++ b/lua/plugins/null-ls.lua @@ -9,14 +9,15 @@ return { null_ls.setup({ sources = { null_ls.builtins.formatting.clang_format, - null_ls.builtins.formatting.autopep8, + -- should use ruff-lsp + -- null_ls.builtins.formatting.autopep8, + -- null_ls.builtins.diagnostics.ruff, null_ls.builtins.diagnostics.mypy.with({ extra_args = function() local virtual = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") or "/usr" return { "--python-executable", virtual .. "/bin/python" } end, }), - null_ls.builtins.diagnostics.ruff, }, }) end |