]> git.huck.website - nvim.git/commitdiff
updated: rust lsp
authorHuck Boles <huck@huck.website>
Sat, 17 Jun 2023 02:51:37 +0000 (21:51 -0500)
committerHuck Boles <huck@huck.website>
Sat, 17 Jun 2023 02:51:37 +0000 (21:51 -0500)
lua/plugins/lsp.lua

index 467ea009052cd80d6095b727dad5a96f601e3686..daffb90ed2fc100da31fb62903b0a5a798c85ae7 100644 (file)
@@ -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', '<LEADER>k', rust.hover_actions.hover_actions, { buffer = bufnr })
                             vim.keymap.set('n', '<LEADER>a', rust.code_action_group.code_action_group, { buffer = bufnr })