summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-programming.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-08-17 10:20:11 +0100
committerjao <jao@gnu.org>2026-08-17 10:20:50 +0100
commitdba7a443d0edb88869c4df70622543a465cf9304 (patch)
tree159e4ea5e904b91b0c0e04ad606b9d282dc5fcbb /custom/jao-custom-programming.el
parent6f6c75ffc0a05cdb84544a966a51bbebb99029d1 (diff)
downloadelibs-dba7a443d0edb88869c4df70622543a465cf9304.tar.gz
elibs-dba7a443d0edb88869c4df70622543a465cf9304.tar.bz2
python tweaksmain
Diffstat (limited to 'custom/jao-custom-programming.el')
-rw-r--r--custom/jao-custom-programming.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el
index e357e38..aed4d29 100644
--- a/custom/jao-custom-programming.el
+++ b/custom/jao-custom-programming.el
@@ -633,21 +633,36 @@
:ensure t
:hook (python-mode . uv-mode-auto-activate-hook))
+(use-package pyinspect
+ :ensure t)
+
(use-package python
+ :ensure t
:init
(setq-default eglot-workspace-configuration
'((:python . (:analysis (:typeCheckingMode "off")))))
(setq python-shell-interpreter "uv"
- python-shell-interpreter-args "run ipython -i --simple-prompt"
+ ;; python-shell-interpreter-args "run ipython -i --simple-prompt"
python-shell-interpreter-args "run python -i")
(defun jao-python-mode-hook ()
(setq-local eglot-prefer-plaintext t)
(eglot-ensure))
+
;; (with-eval-after-load 'eglot
;; (add-to-list 'eglot-server-programs
;; '((python-base-mode :language-id "python") . ("ty" "server"))))
- :hook (python-base-mode . jao-python-mode-hook))
+ (defun jao-inferior-python-mode-hook ()
+ (setq-local comint-input-ring-file-name "~/.emacs.d/cache/python_history")
+ (comint-read-input-ring 'silent)
+ (add-hook 'kill-buffer-hook #'comint-write-input-ring nil t))
+
+ :hook ((python-base-mode . jao-python-mode-hook)
+ (inferior-python-mode . jao-inferior-python-mode-hook))
+
+ :bind (:map inferior-python-mode-map
+ ("M-p" . comint-previous-matching-input-from-input)
+ ("M-n" . comint-next-matching-input-from-input)))
;;;; Javascript