summaryrefslogtreecommitdiff
path: root/nemacs-personal.el
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2024-05-28 11:19:22 -0700
committerChristian Cunningham <cc@localhost>2024-05-28 11:19:22 -0700
commitf14c2d3fe50de3c55e7c9684e93cdf5608a00b89 (patch)
treea8ea3bdb68779ecdce6d7be8b7d8f56a9ff3b4c1 /nemacs-personal.el
Initial Commit
Diffstat (limited to 'nemacs-personal.el')
-rw-r--r--nemacs-personal.el60
1 files changed, 60 insertions, 0 deletions
diff --git a/nemacs-personal.el b/nemacs-personal.el
new file mode 100644
index 0000000..f7e82ad
--- /dev/null
+++ b/nemacs-personal.el
@@ -0,0 +1,60 @@
+;; Ignore bell
+(setq ring-bell-function 'ignore)
+
+(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)
+
+(add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode))
+
+(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"))
+ (plist-put png :image-converter '("dvipng -D %D -T tight -o %O %F"))
+ (plist-put png :transparent-image-converter '("dvipng -D %D -T tight -bg Transparent -o %O %F")))
+
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((python . t)
+ (gnuplot . t)
+ (R . t)))
+(setq org-babel-python-command python-shell-interpreter)
+(setq org-babel-R-command "/usr/local/bin/R --slave --no-save")
+(setq org-babel-gnuplot-command "/usr/local/bin/gnuplot")
+(setq org-confirm-babel-evaluate nil)
+
+(defun nm/personal/ignore-angle-brackets ()
+ "Ignore angle brackets in org mode"
+ (modify-syntax-entry ?< ".")
+ (modify-syntax-entry ?> "."))
+(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)
+
+(with-eval-after-load 'python
+ (defun python-shell-completion-native-try ()
+ "Return non-nil if can trigger native completion."
+ (let ((python-shell-completion-native-enable t)
+ (python-shell-completion-native-output-timeout
+ python-shell-completion-native-try-output-timeout))
+ (python-shell-completion-native-get-completions
+ (get-buffer-process (current-buffer))
+ nil "_"))))
+
+(setq sentence-end-double-space nil)
+
+(setq nm/dashboard-file nil)
+(setq nm/dashboard-file "~/nemacs/dashboard.org")
+(if nm/dashboard-file
+ (find-file nm/dashboard-file))
+
+(provide 'nemacs-personal)