Configuration de Neovim : ajout d'un LSP pour Rust

This commit is contained in:
Hippolyte Chauvin 2023-10-26 18:25:45 +02:00
parent 2de18f64d7
commit eea00267e7
2 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,4 @@
nvim_lsp = require'lspconfig' nvim_lsp = require'lspconfig'
require('lsp.bash') require('lsp.bash')
require('lsp.rust')

View file

@ -0,0 +1,25 @@
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
},
}
}
})