diff options
Diffstat (limited to 'nemacs-personal.el')
-rw-r--r-- | nemacs-personal.el | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/nemacs-personal.el b/nemacs-personal.el index f7e82ad..4482e50 100644 --- a/nemacs-personal.el +++ b/nemacs-personal.el @@ -4,16 +4,26 @@ (setq python-shell-interpreter "~/.micromamba/envs/emacs-py/bin/ipython" python-shell-interpreter-args "--pylab") - -;(add-hook 'python-ts-mode-hook #'(lambda () (progn -; (local-set-key (kbd "C-c l a") 'eglot-code-action-inline) -; (local-set-key (kbd "C-c l r") 'eglot-rename) -; (local-set-key (kbd "C-c l f") 'eglot-format) -; (local-set-key (kbd "C-c l d") 'eldoc)))) -;(add-hook 'python-ts-mode-hook 'eglot-ensure) +(defun nm/add-to-pypath (&optional path) + "# Add to python path" + (interactive) + (let* ((fullpath (if path + path + (ido-read-directory-name "Path: ")))) + (setenv "PYTHONPATH" + (let ((current (getenv "PYTHONPATH")) + (new fullpath)) + (if current + (concat new ":" current) + new))))) (add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode)) +(require 'eglot) +(define-key eglot-mode-map (kbd "C-c l r") 'eglot-rename) +(define-key eglot-mode-map (kbd "C-c l f") 'eglot-format) +(define-key eglot-mode-map (kbd "C-c l d") 'eldoc) + (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8)) (let ((png (cdr (assoc 'dvipng org-preview-latex-process-alist)))) (plist-put png :latex-compiler '("latex -interaction nonstopmode -output-directory %o %F")) @@ -37,8 +47,8 @@ (add-hook 'org-mode-hook 'nm/personal/ignore-angle-brackets) (add-to-list 'load-path "~/.emacs.d/extras/") -(require 'writegood-mode) -(global-set-key (kbd "C-c g") 'writegood-mode) +(when (require 'writegood-mode nil t) + (global-set-key (kbd "C-c g") 'writegood-mode)) (with-eval-after-load 'python (defun python-shell-completion-native-try () |