Remaniement : configuration de rust-analyzer dans un module de lsp
This commit is contained in:
parent
407081f6b7
commit
00da33f238
2 changed files with 21 additions and 23 deletions
|
@ -3,26 +3,3 @@ local nvim_lsp = require'lspconfig'
|
|||
local on_attach = function(client)
|
||||
require'completion'.on_attach(client)
|
||||
end
|
||||
|
||||
nvim_lsp.rust_analyzer.setup({
|
||||
on_attach=on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
imports = {
|
||||
granularity = {
|
||||
group = "module",
|
||||
},
|
||||
prefix = "self",
|
||||
},
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
enable = true
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
nvim_lsp.rust_analyzer.setup({
|
||||
on_attach=on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
imports = {
|
||||
granularity = {
|
||||
group = "module",
|
||||
},
|
||||
prefix = "self",
|
||||
},
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
enable = true
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Reference in a new issue