caio.co/de/dotfiles

lsp: extract common config

Id
be685a2fe822985fe4a55331a32406349a465298
Author
Caio
Commit time
2023-06-29T16:59:21+02:00

Modified config/nvim/lua/config/lsp.lua

@@ -44,11 +44,14
})
end

+config.util.default_config = vim.tbl_deep_extend('force', config.util.default_config, {
+ on_attach = on_attach,
+ flags = {
+ debounce_text_changes = 150,
+ }
+})
+
config.rust_analyzer.setup({
- on_attach = on_attach,
- flags = {
- debounce_text_changes = 150,
- },
cmd = {"rustup", "run", "stable", "rust-analyzer"},
settings = {
["rust-analyzer"] = {
@@ -63,10 +66,6
})

config.gopls.setup({
- on_attach = on_attach,
- flags = {
- debounce_text_changes = 150,
- },
cmd = {
'gopls',
'-remote=auto',