forked from ahurac/dotfiles
Configuration de Neovim : ajout d'un LSP pour Rust
This commit is contained in:
parent
2de18f64d7
commit
eea00267e7
2 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
nvim_lsp = require'lspconfig'
|
||||
|
||||
require('lsp.bash')
|
||||
require('lsp.rust')
|
||||
|
|
25
config/nvim/lua/lsp/rust.lua
Normal file
25
config/nvim/lua/lsp/rust.lua
Normal 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
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Reference in a new issue