1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
return {
{
"neovim/nvim-lspconfig",
dependencies = {
"simrat39/rust-tools.nvim",
},
opts = {
servers = {
rust_analyzer = {
mason = false,
cmd = { vim.fn.expand("/usr/sbin/rust-analyzer") },
settings = {
["rust-analyzer"] = {
imports = {
granularity = {
group = "module",
},
prefix = "self",
},
cargo = {
allFeatures = true,
loadOutDirsFromCheck = true,
runBuildScripts = true,
buildScripts = {
enable = true,
},
},
procMacro = {
enable = true,
},
checkOnSave = {
allFeatures = true,
command = "clippy",
extraArgs = { "--no-deps" },
},
},
},
},
},
setup = {
rust_analyzer = function(_, opts)
require("rust-tools").setup({ server = opts })
return true
end,
},
},
},
}
|