diff options
author | Juan J. Martinez <jjm@usebox.net> | 2024-05-03 14:27:26 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2024-05-03 14:27:26 +0100 |
commit | 4a04c8dae449bf983342e1647f963644156dac74 (patch) | |
tree | 5864f544a21ccc1842c1b93100bd0c0ec790c3bb /lsp.lua | |
parent | d16de57d96bd99772dcc2253d4fa0f334071006e (diff) | |
download | dotnvim-master.tar.gz dotnvim-master.zip |
Diffstat (limited to 'lsp.lua')
-rw-r--r-- | lsp.lua | 40 |
1 files changed, 27 insertions, 13 deletions
@@ -34,16 +34,16 @@ end -- better UI vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( - vim.lsp.handlers.hover, { - -- Use a sharp border with `FloatBorder` highlights - border = "single" - } +vim.lsp.handlers.hover, { + -- Use a sharp border with `FloatBorder` highlights + border = "single" +} ) vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( - vim.lsp.handlers.signature_help, { - -- Use a sharp border with `FloatBorder` highlights - border = "single" - } +vim.lsp.handlers.signature_help, { + -- Use a sharp border with `FloatBorder` highlights + border = "single" +} ) -- Use a loop to conveniently call 'setup' on multiple servers and @@ -70,14 +70,28 @@ local servers = { lua_ls = { lua_ls = { }, }, + rust_analyzer = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true + }, + }, + }, } for lsp, settings in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, - flags = { - -- This will be the default in neovim 0.7+ - debounce_text_changes = 150, - }, settings = settings, } end @@ -88,5 +102,5 @@ vim.diagnostic.config({ virtual_text = true, signs = true }) require("trouble").setup() vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>TroubleToggle<cr>", - {silent = true, noremap = true} +{silent = true, noremap = true} ) |