Skip to content

Commit 236762f

Browse files
committed
lsp-mode: update client-capabilities.json for code actions
Rust analyzer will not return any code actions unless `codeActionLiteralSupport` is enabled. This adds it to the default client capabilities, based on what is configured in emacs lsp-mode, see https://github.com/emacs-lsp/lsp-mode/blob/c36b95be6625dac5a37d3874a1a738e0c84ac39f/lsp-mode.el#L3731-L3738 With this change, they do show up provided you run `M-x lsp-code-action` when in a valid location.
1 parent f509ebd commit 236762f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

extensions/lsp-mode/client-capabilities.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@
4444
"hierarchicalDocumentSymbolSupport":true
4545
},
4646
"codeAction":{
47+
"codeActionLiteralSupport": {
48+
"codeActionKind": {
49+
"valueSet": [
50+
"",
51+
"quickfix",
52+
"refactor",
53+
"refactor.extract",
54+
"refactor.inline",
55+
"refactor.rewrite",
56+
"source",
57+
"source.organizeImports"
58+
]
59+
}
60+
}
4761
},
4862
"formatting":{
4963
},

0 commit comments

Comments
 (0)