summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nemacs-personal.el28
-rw-r--r--nemacs.el1
2 files changed, 20 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 ()
diff --git a/nemacs.el b/nemacs.el
index 421fca7..12365da 100644
--- a/nemacs.el
+++ b/nemacs.el
@@ -22,6 +22,7 @@
;;(require 'nemacs-splash)
(put 'narrow-to-region 'disabled nil)
+(put 'downcase-region 'disabled nil)
(require 'nemacs-personal)
(custom-set-faces