diff options
| -rw-r--r-- | custom/jao-custom-programming.el | 19 | ||||
| -rw-r--r-- | init.el | 8 |
2 files changed, 21 insertions, 6 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 @@ -1233,11 +1233,11 @@ (setq frame-title-format '("emacs - " (:eval (jao-afio-frame-name)))) (jao-when-darwin - (jao-afio-add-frame-parameters "docs" (width . 195) (height . 75)) + (jao-afio-add-frame-parameters "docs" (width . 210) (height . 78)) (unless jao-afio-skip-default-set - (jao-afio-add-frame-parameters nil (width . 170) (height . 70))) - (add-to-list 'default-frame-alist '(height . 70)) - (add-to-list 'default-frame-alist '(width . 170))) + (jao-afio-add-frame-parameters nil (width . 170) (height . 70)) + (add-to-list 'default-frame-alist '(height . 70)) + (add-to-list 'default-frame-alist '(width . 170)))) :bind (("C-c f" . 'jao-afio-goto-main) ("C-c g" . 'jao-afio-goto-mail) |
