From: Huck Boles Date: Sat, 17 Jun 2023 02:51:37 +0000 (-0500) Subject: updated: rust lsp X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=7c760300b9f7ee96ae81d705dbec2d91b101da94;p=nvim.git updated: rust lsp --- diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 467ea00..daffb90 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -200,6 +200,25 @@ return { } }, server = { + settings = { + ['rust-analyzer'] = { + completion = { + callable = { snippets = "add_parentheses" } + }, + hover = { + actions = { + references = { enable = true }, + } + }, + imports = { + granularity = { enforce = true } + }, + inlay_hints = { + closureReturnTypeHints = { enable = 'with_block' }, + lifetimeElisionHints = { enable = 'skip_trivial' }, + } + } + }, on_attach = function(_, bufnr) vim.keymap.set('n', 'k', rust.hover_actions.hover_actions, { buffer = bufnr }) vim.keymap.set('n', 'a', rust.code_action_group.code_action_group, { buffer = bufnr })