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
|
||||
: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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue