add settings to rust-analyzer
procMacro specifically
This commit is contained in:
parent
ceddfe4e8f
commit
319356d0a0
1 changed files with 24 additions and 1 deletions
25
lua/lang.lua
25
lua/lang.lua
|
@ -79,11 +79,34 @@ capabilities.textDocument.codeAction = {
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
||||||
|
|
||||||
-- LSPs
|
-- LSPs
|
||||||
local servers = {"pylsp", "rust_analyzer", "vimls", "ocamllsp"}
|
local servers = {"pylsp", "vimls", "ocamllsp"}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {capabilities = capabilities, on_attach = on_attach}
|
nvim_lsp[lsp].setup {capabilities = capabilities, on_attach = on_attach}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
nvim_lsp.rust_analyzer.setup({
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
imports = {
|
||||||
|
granularity = {
|
||||||
|
group = "module",
|
||||||
|
},
|
||||||
|
prefix = "self",
|
||||||
|
},
|
||||||
|
cargo = {
|
||||||
|
buildScripts = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
procMacro = {
|
||||||
|
enable = true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- symbols-outline.nvim
|
-- symbols-outline.nvim
|
||||||
vim.g.symbols_outline = {
|
vim.g.symbols_outline = {
|
||||||
highlight_hovered_item = true,
|
highlight_hovered_item = true,
|
||||||
|
|
Reference in a new issue