diff options
Diffstat (limited to 'custom/jao-custom-programming.el')
| -rw-r--r-- | custom/jao-custom-programming.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el index 0e749c0..034bb63 100644 --- a/custom/jao-custom-programming.el +++ b/custom/jao-custom-programming.el @@ -640,19 +640,21 @@ ;; 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) + (setq-local eglot-documentation-renderer t) (eglot-ensure)) - ;; (with-eval-after-load 'eglot - ;; (add-to-list 'eglot-server-programs - ;; '((python-base-mode :language-id "python") . ("ty" "server")))) + (with-eval-after-load 'eglot + (add-to-list 'eglot-server-programs + '((python-base-mode :language-id "python") . ("ty" "server")))) + + (defvar jao-python-history-file "~/.emacs.d/cache/python_history") (defun jao-inferior-python-mode-hook () - (setq-local comint-input-ring-file-name "~/.emacs.d/cache/python_history") + (setq-local comint-input-ring-file-name jao-python-history-file) (comint-read-input-ring 'silent) + ;; (add-hook 'kill-buffer-hook #'comint-write-input-ring nil t) (set-process-sentinel (get-buffer-process (current-buffer)) - (lambda (_p _e) (comint-write-input-ring))) - (add-hook 'kill-buffer-hook #'comint-write-input-ring nil t)) + (lambda (_p _e) (comint-write-input-ring)))) :hook ((python-base-mode . jao-python-mode-hook) (inferior-python-mode . jao-inferior-python-mode-hook)) |
