diff options
author | Matthew Kosarek <matthew@matthewkosarek.xyz> | 2023-09-19 10:27:25 -0400 |
---|---|---|
committer | Matthew Kosarek <matthew@matthewkosarek.xyz> | 2023-09-19 10:27:25 -0400 |
commit | 8a34cf5a197f7176210cc91b5f26999676ced574 (patch) | |
tree | c76d51066c5cf0cb58ed17886a2d9522d6140d8f /lisp/python-custom.el | |
parent | 4cde52d01f0f6f64b4068a5f3ed26e2d669d1c39 (diff) |
Kanagawa theme and putting all custom commands in an mk file
Diffstat (limited to 'lisp/python-custom.el')
-rw-r--r-- | lisp/python-custom.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/python-custom.el b/lisp/python-custom.el index 2c602a5..3d076cb 100644 --- a/lisp/python-custom.el +++ b/lisp/python-custom.el @@ -1,4 +1,4 @@ - +1 ;;; Code: (use-package python :ensure t) @@ -9,6 +9,19 @@ :hook ((python-mode . eglot-ensure))) +(use-package pyvenv + :ensure t + :config + (pyvenv-mode t) + + ;; Set correct Python interpreter + (setq pyvenv-post-activate-hooks + (list (lambda () + (setq python-shell-interpreter (concat pyvenv-virtual-env "bin/python3"))))) + (setq pyvenv-post-deactivate-hooks + (list (lambda () + (setq python-shell-interpreter "python3"))))) + (defun python-args-to-google-docstring (text &optional make-fields) "Return a reST docstring format for the python arguments in yas-text." (let* ((indent (concat "\n" (make-string (current-column) 32))) @@ -29,5 +42,7 @@ indent) "\n")))) +(setq python-indent-guess-indent-offset nil) + (provide 'python-custom) ;;; python-custom.el ends here |