lang/python: use anaconda-mode for non-project files
This commit is contained in:
parent
eb62dde5d3
commit
c79cf3c820
1 changed files with 5 additions and 2 deletions
|
@ -56,8 +56,7 @@ called.")
|
||||||
|
|
||||||
|
|
||||||
(def-package! anaconda-mode
|
(def-package! anaconda-mode
|
||||||
:unless (featurep! +lsp)
|
:hook (python-mode-local-vars . +python|init-anaconda-mode-maybe)
|
||||||
:hook python-mode-local-vars
|
|
||||||
:init
|
:init
|
||||||
(setq anaconda-mode-installation-directory (concat doom-etc-dir "anaconda/")
|
(setq anaconda-mode-installation-directory (concat doom-etc-dir "anaconda/")
|
||||||
anaconda-mode-eldoc-as-single-line t)
|
anaconda-mode-eldoc-as-single-line t)
|
||||||
|
@ -70,6 +69,10 @@ called.")
|
||||||
:documentation #'anaconda-mode-show-doc)
|
:documentation #'anaconda-mode-show-doc)
|
||||||
(set-popup-rule! "^\\*anaconda-mode" :select nil)
|
(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 ()
|
(defun +python|auto-kill-anaconda-processes ()
|
||||||
"Kill anaconda processes if this buffer is the last python buffer."
|
"Kill anaconda processes if this buffer is the last python buffer."
|
||||||
(when (and (eq major-mode 'python-mode)
|
(when (and (eq major-mode 'python-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue