mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(python): ensure anaconda-mode and +lsp are mutually exclusive
I'm considering removing anaconda entirely from the module (to lean on LSP), but for the time being, this should help with anaconda taking over ine eglot-enabled buffers. Fix: #7823
This commit is contained in:
@ -104,6 +104,12 @@
|
|||||||
(bound-and-true-p lsp--buffer-deferred)
|
(bound-and-true-p lsp--buffer-deferred)
|
||||||
(not (executable-find python-shell-interpreter t)))
|
(not (executable-find python-shell-interpreter t)))
|
||||||
(anaconda-mode +1))))
|
(anaconda-mode +1))))
|
||||||
|
|
||||||
|
(add-hook! 'eglot-server-initialized-hook
|
||||||
|
(defun +python-disable-anaconda-mode-h ()
|
||||||
|
"Ensure `anaconda-mode' doesn't interfere with `eglot'."
|
||||||
|
(when (bound-and-true-p anaconda-mode)
|
||||||
|
(anaconda-mode -1))))
|
||||||
:config
|
:config
|
||||||
(set-company-backend! 'anaconda-mode '(company-anaconda))
|
(set-company-backend! 'anaconda-mode '(company-anaconda))
|
||||||
(set-lookup-handlers! 'anaconda-mode
|
(set-lookup-handlers! 'anaconda-mode
|
||||||
|
Reference in New Issue
Block a user