diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 403071e64..3ccbd46f1 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -56,8 +56,7 @@ called.") (def-package! anaconda-mode - :unless (featurep! +lsp) - :hook python-mode-local-vars + :hook (python-mode-local-vars . +python|init-anaconda-mode-maybe) :init (setq anaconda-mode-installation-directory (concat doom-etc-dir "anaconda/") anaconda-mode-eldoc-as-single-line t) @@ -70,6 +69,10 @@ called.") :documentation #'anaconda-mode-show-doc) (set-popup-rule! "^\\*anaconda-mode" :select nil) + (defun +python|init-anaconda-mode-maybe () + (unless (bound-and-true-p lsp-mode) + (anaconda-mode +1))) + (defun +python|auto-kill-anaconda-processes () "Kill anaconda processes if this buffer is the last python buffer." (when (and (eq major-mode 'python-mode)