Skip to content

Commit a2b98b0

Browse files
japaricbrotzeit
authored andcommitted
lsp-rust/rust-analyzer: expose experimental_procAttrMacros setting
this config flag was added in rust-lang/rust-analyzer#9128 when enabled, the existing `lsp-rust-analyzer-expand-macro` function will also expand proc macro attributes as this is an experimental feature, the default value of the setting is nil
1 parent d904e8a commit a2b98b0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

clients/lsp-rust.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,12 @@ https://rust-analyzer.github.io/manual.html#auto-import.
614614
:group 'lsp-rust-analyzer
615615
:package-version '(lsp-mode . "7.1.0"))
616616

617+
(defcustom lsp-rust-analyzer-experimental-proc-attr-macros nil
618+
"Whether to enable experimental support for expanding proc macro attributes."
619+
:type 'boolean
620+
:group 'lsp-rust-analyzer
621+
:package-version '(lsp-mode . "7.1.0"))
622+
617623
(defun lsp-rust-analyzer--make-init-options ()
618624
"Init options for rust-analyzer"
619625
`(:diagnostics (:enable ,(lsp-json-bool lsp-rust-analyzer-diagnostics-enable)
@@ -660,7 +666,8 @@ https://rust-analyzer.github.io/manual.html#auto-import.
660666
:callInfo (:full ,(lsp-json-bool lsp-rust-analyzer-call-info-full))
661667
:procMacro (:enable ,(lsp-json-bool lsp-rust-analyzer-proc-macro-enable))
662668
:rustcSource ,lsp-rust-analyzer-rustc-source
663-
:highlighting (:strings ,(lsp-json-bool lsp-rust-analyzer-highlighting-strings))))
669+
:highlighting (:strings ,(lsp-json-bool lsp-rust-analyzer-highlighting-strings))
670+
:experimental (:procAttrMacros ,(lsp-json-bool lsp-rust-analyzer-experimental-proc-attr-macros))))
664671

665672
(defconst lsp-rust-notification-handlers
666673
'(("rust-analyzer/publishDecorations" . (lambda (_w _p)))))

0 commit comments

Comments
 (0)