nvim config stolen from @Lukacms
This commit is contained in:
27
nvim/lua/lsp/rust-analyzer.lua
Normal file
27
nvim/lua/lsp/rust-analyzer.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local M = {}
|
||||
|
||||
M.setup = function(on_attach, capabilities)
|
||||
require("rust-tools").setup({
|
||||
server = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = "clippy",
|
||||
},
|
||||
cargo = {
|
||||
autoreload = true,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
disabled = { "unresolved-proc-macro" },
|
||||
enableExperimental = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user