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:
parent
a0dadda266
commit
d14ddbf694
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue