From e8851ec1cba14f33109affaf459b8e87d074c70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Thu, 30 Jun 2022 19:14:29 +0100 Subject: [PATCH] disable all-targets for rust analyzer, enbale procmacros --- config/programs/vim/lsp.lua | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/config/programs/vim/lsp.lua b/config/programs/vim/lsp.lua index a2858e88..812bf348 100644 --- a/config/programs/vim/lsp.lua +++ b/config/programs/vim/lsp.lua @@ -38,14 +38,18 @@ end -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches -local servers = { 'rust_analyzer' } -for _, lsp in pairs(servers) do - require('lspconfig')[lsp].setup { - on_attach = on_attach, - flags = { - -- This will be the default in neovim 0.7+ - debounce_text_changes = 150, - }, - capabilities = capabilities - } -end +require('lspconfig')[lsp].setup { + on_attach = on_attach, + settings = { + ["rust-analyzer"] = { + checkOnSave = { + allTargets = false, + command = "clippy", + }, + procMacro = { + enable = true + } + } + }, + capabilities = capabilities +}