From d9fc1b77659b0024477a7f4729e411a94be4f60f Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 29 Nov 2022 10:45:32 -0800 Subject: [PATCH] add rust-analyzer config to nvim.lua --- .vim/nvim.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vim/nvim.lua b/.vim/nvim.lua index fb95890..0cd4e9b 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -21,6 +21,17 @@ rust_capabilities.textDocument.completion.completionItem.resolveSupport = { nvim_lsp.rust_analyzer.setup({ on_attach = on_attach, capabilities = rust_capabilities, + settings = { + ['rust-analyzer'] = { + checkOnSave = { + allFeatures = true, + overrideCommand = { + 'cargo', 'clippy', '--workspace', '--message-format=json', + '--all-targets', '--all-features' + } + } + } + } }) nvim_lsp.gopls.setup({ on_attach = on_attach }) nvim_lsp.pyright.setup({ on_attach = on_attach })