   (conda-env-initialize-interactive-shells)
   (after! eshell (conda-env-initialize-eshell))
 
-  (add-to-list '+python-mode-name-functions #'+python-conda-env nil #'eq)
+  (add-hook 'conda-postactivate-hook #'+python|update-version)
+  (add-hook 'conda-postdeactivate-hook #'+python|update-version)
+  (add-to-list '+python-version-functions #'+python-conda-env nil #'eq)
 
   (advice-add 'anaconda-mode-bootstrap :override #'+python*anaconda-mode-bootstrap-in-remote-environments))

  :after python
  :config
  (defun +python-current-pyvenv () pyvenv-virtual-env-name)
  (add-to-list '+python-mode-name-functions #'+python-current-pyvenv nil #'eq))


(def-package! conda
  :when (featurep! +conda)
  :after python
  :config
  ;; Adds conda support to Doom Emacs. `conda-anaconda-home' should be the path
  ;; to your anaconda installation, and will be guessed from the following:
  ;;
  ;; + ~/.anaconda3
  ;; + ~/.anaconda
  ;; + ~/.miniconda
  ;; + ~/usr/bin/anaconda3
  ;;
  ;; If none of these work, you'll need to set `conda-anaconda-home' yourself.
  ;;
  ;; Once set, run M-x `conda-env-activate' to switch between environments OR
  ;; turn on `conda-env-autoactivate-mode' if you want it done automatically.
  (unless (cl-loop for dir in (list conda-anaconda-home
                                    "~/.anaconda"
                                    "~/.miniconda"

;;; lang/python/config.el -*- lexical-binding: t; -*-

(defvar +python-version-functions '(+python-version)
  "A list of functions to retrieve a version or environment string from. The
first to return non-nil will have its result appended to the python-mode
`mode-name' and displayed in the mode-line.")
