From 7c760300b9f7ee96ae81d705dbec2d91b101da94 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Fri, 16 Jun 2023 21:51:37 -0500 Subject: [PATCH] updated: rust lsp --- lua/plugins/lsp.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 }) -- 2.45.2