Fix #2541: empty imenu list in rustic+rls buffers
This commit is contained in:
parent
cd3103b1be
commit
0e1a737127
1 changed files with 10 additions and 1 deletions
|
@ -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")))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue