Add command to run python from root

This commit is contained in:
Jeremy Dormitzer 2021-10-05 11:09:13 -04:00
parent 7cb66c68d5
commit aa4ae9a75e

View File

@ -32,6 +32,17 @@
default-directory))) default-directory)))
(add-to-list 'flycheck-disabled-checkers 'python-flake8)) (add-to-list 'flycheck-disabled-checkers 'python-flake8))
;; Run a python repl at the project root
(defun projectile-run-python ()
(interactive)
(let ((default-directory (projectile-project-root)))
(call-interactively #'run-python)))
(with-eval-after-load 'projectile
(general-def projectile-command-map
"s p" #'projectile-run-python
"x p" #'projectile-run-python))
;; pyvenv to track virtual environments ;; pyvenv to track virtual environments
(use-package pyvenv (use-package pyvenv
:defer 3 :defer 3