UPDATED init.lua to support more advanced Rust Analyzer LSP features.
This commit is contained in:
parent
fc3f20a29b
commit
5ae1f17bcd
29
init.lua
29
init.lua
|
@ -666,7 +666,34 @@ require('lazy').setup({
|
|||
clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
rust_analyzer = {},
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
loadOutDirsFromCheck = true,
|
||||
runBuildScripts = true,
|
||||
},
|
||||
-- Add clippy lints for better code suggestions
|
||||
checkOnSave = {
|
||||
command = 'clippy',
|
||||
extraArgs = { '--no-deps' },
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
['async-trait'] = { 'async_trait' },
|
||||
['napi-derive'] = { 'napi' },
|
||||
['async-recursion'] = { 'async_recursion' },
|
||||
},
|
||||
},
|
||||
-- Enable experimental features
|
||||
experimental = {
|
||||
procAttrMacros = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||
|
|
Loading…
Reference in New Issue