34 lines
533 B
Lua
34 lines
533 B
Lua
---@type vim.lsp.Config
|
|
return {
|
|
cmd = { "rust-analyzer" },
|
|
filetypes = { "rust" },
|
|
root_markers = {
|
|
"Cargo.toml",
|
|
},
|
|
settings = {
|
|
["rust-analyzer"] = {
|
|
cargo = {
|
|
allFeatures = true,
|
|
loadOutDirsFromCheck = true,
|
|
},
|
|
procMacro = {
|
|
enable = true,
|
|
},
|
|
checkOnSave = true,
|
|
check = {
|
|
command = "clippy",
|
|
extraArgs = { "--no-deps" },
|
|
},
|
|
diagnostics = {
|
|
enable = true,
|
|
enableExperimental = true,
|
|
},
|
|
completion = {
|
|
postfix = {
|
|
enable = false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|