fix(lsp): eglot-ensure advice nooping in some major modes
Due to the nested structure of eglot-server-programs, our advice would not correctly detect entries for some modes (like javascript modes), effectively disabling Eglot in those modes. I've replaced the advice with a solution baked into lsp!, so folks still have the option of using eglot-ensure directly if they want it activated unconditionally. Amend: #7219
This commit is contained in:
parent
88666b1913
commit
173842ccea
2 changed files with 4 additions and 10 deletions
|
@ -5,6 +5,9 @@
|
|||
"Dispatch to call the currently used lsp client entrypoint"
|
||||
(interactive)
|
||||
(if (modulep! +eglot)
|
||||
(eglot-ensure)
|
||||
(when (require 'eglot nil t)
|
||||
(if (eglot--lookup-mode major-mode)
|
||||
(eglot-ensure)
|
||||
(eglot--message "No client defined for %s" major-mode)))
|
||||
(unless (bound-and-true-p lsp-mode)
|
||||
(lsp-deferred))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue