summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/lspconfig.lua25
-rw-r--r--lua/plugins/null-ls.lua5
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