add settings to rust-analyzer

procMacro specifically
This commit is contained in:
Vladan Popovic 2023-02-24 22:46:53 +01:00
parent ceddfe4e8f
commit 319356d0a0

View file

@ -79,11 +79,34 @@ capabilities.textDocument.codeAction = {
capabilities.textDocument.completion.completionItem.snippetSupport = true;
-- LSPs
local servers = {"pylsp", "rust_analyzer", "vimls", "ocamllsp"}
local servers = {"pylsp", "vimls", "ocamllsp"}
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {capabilities = capabilities, on_attach = on_attach}
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
vim.g.symbols_outline = {
highlight_hovered_item = true,