Ajout : fichier de configuration pour le LSP
Première version avec inclusion de rust-analyzer qui sera modularisé par la suite
This commit is contained in:
parent
d2fd114995
commit
ec5fd3cb6a
1 changed files with 28 additions and 0 deletions
28
config/nvim/lua/core/lsp.lua
Normal file
28
config/nvim/lua/core/lsp.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
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
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in a new issue