mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix #2541: empty imenu list in rustic+rls buffers
This commit is contained in:
@ -48,10 +48,19 @@
|
||||
:desc "all" "a" #'rustic-cargo-test
|
||||
:desc "current test" "t" #'rustic-cargo-current-test))
|
||||
|
||||
;; HACK Fixes #2541: RLS doesn't appear to support documentSymbol, but
|
||||
;; lsp-rust thinks it does, and so yields imenu population to the server.
|
||||
;; The result is an empty imenu list. Until RLS supports documentSymbol,
|
||||
;; we disable `lsp-enable-imenu' is rust+RLS buffers.
|
||||
(defadvice! +rust--disable-imenu-for-lsp-mode-a (&rest _)
|
||||
:before #'rustic-lsp-mode-setup
|
||||
(when (eq rustic-lsp-server 'rls)
|
||||
(setq-local lsp-enable-imenu nil)))
|
||||
|
||||
;; If lsp/elgot isn't available, it attempts to install lsp-mode via
|
||||
;; package.el. Doom manages its own dependencies through straight so disable
|
||||
;; this behavior to avoid package-not-initialized errors.
|
||||
(defadvice! +rust--dont-install-packages-p (&rest _)
|
||||
(defadvice! +rust--dont-install-packages-a (&rest _)
|
||||
:override #'rustic-install-lsp-client-p
|
||||
(message "No LSP server running")))
|
||||
|
||||
|
Reference in New Issue
Block a user