add rust-analyzer config to nvim.lua

This commit is contained in:
Barak Michener 2022-11-29 10:45:32 -08:00
parent a13b50be39
commit d9fc1b7765

View file

@ -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 })