aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/rust_analyzer.lua
diff options
context:
space:
mode:
authorMike J McGuirk <62523234+mikejmcguirk@users.noreply.github.com>2025-11-22 02:18:30 -0500
committerGitHub <noreply@github.com>2025-11-21 23:18:30 -0800
commit784531c83cdab93ed7a2ec10f0111ca564b1c18a (patch)
tree558535e29717ea75f4366cf111930322a605d9eb /lsp/rust_analyzer.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.tar
nvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.tar.gz
nvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.tar.bz2
nvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.tar.lz
nvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.tar.xz
nvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.tar.zst
nvim-lspconfig-784531c83cdab93ed7a2ec10f0111ca564b1c18a.zip
feat(rust_analyzer): enable codelens (#4210)
Problem: rust_analyzer does not contain the configs for codelens by default Solution: Add codelens config
Diffstat (limited to 'lsp/rust_analyzer.lua')
-rw-r--r--lsp/rust_analyzer.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/lsp/rust_analyzer.lua b/lsp/rust_analyzer.lua
index efac25a6..c5eed517 100644
--- a/lsp/rust_analyzer.lua
+++ b/lsp/rust_analyzer.lua
@@ -114,6 +114,23 @@ return {
},
},
},
+ settings = {
+ ['rust-analyzer'] = {
+ lens = {
+ debug = { enable = true },
+ enable = true,
+ implementations = { enable = true },
+ references = {
+ adt = { enable = true },
+ enumVariant = { enable = true },
+ method = { enable = true },
+ trait = { enable = true },
+ },
+ run = { enable = true },
+ updateTest = { enable = true },
+ },
+ },
+ },
before_init = function(init_params, config)
-- See https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26
if config.settings and config.settings['rust-analyzer'] then