aboutsummaryrefslogtreecommitdiff
path: root/config/emacs.org
diff options
context:
space:
mode:
Diffstat (limited to 'config/emacs.org')
-rw-r--r--config/emacs.org20
1 files changed, 15 insertions, 5 deletions
diff --git a/config/emacs.org b/config/emacs.org
index ff6342e..ffd2d3a 100644
--- a/config/emacs.org
+++ b/config/emacs.org
@@ -26,9 +26,9 @@ emacs work in a semi-sane way and make it not look completely ugly:
(setq make-backup-files nil)
(setq org-export-with-broken-links t)
(setq org-src-fontify-natively t)
+ (setq org-highlight-latex-and-related '(latex script entities))
(setq warning-minimum-level :emergency)
(add-hook 'text-mode-hook 'visual-line-mode)
- (add-hook 'after-save-hook 'eglot-format)
(setq debug-ignored-errors
(cons 'remote-file-error debug-ignored-errors))
#+end_src
@@ -88,10 +88,16 @@ what electric-pair does based on the mode.
Otherwise, just insert the typed character."
(interactive)
(if (eolp) (let (parens-require-spaces) (insert-pair)) (self-insert-command 1)))
+
(add-hook 'org-mode-hook
(lambda ()
(define-key org-mode-map "\"" 'electric-pair)
- (define-key org-mode-map "\'" 'electric-pair)
+ (define-key org-mode-map "(" 'electric-pair)
+ (define-key org-mode-map "[" 'electric-pair)
+ (define-key org-mode-map "{" 'electric-pair)))
+ (add-hook 'prog-mode-hook
+ (lambda ()
+ (define-key org-mode-map "\"" 'electric-pair)
(define-key org-mode-map "(" 'electric-pair)
(define-key org-mode-map "[" 'electric-pair)
(define-key org-mode-map "{" 'electric-pair)))
@@ -274,6 +280,7 @@ Ivy is a pretty cool general program for displaying stuff:
"m P p" 'org-publish
"s e" 'sudo-edit
"m m" 'emms
+ "f f" 'eglot-format
"h m" '(woman :wk "Manual")
"h r r" '(lambda () (interactive) (org-babel-load-file (expand-file-name "~/org/website/config/emacs.org")))
))
@@ -316,12 +323,15 @@ For all my mathematics and programming notes:
#+begin_src emacs-lisp
(use-package org-roam
:init
+ (setq org-roam-db-update-on-save t)
(setq org-roam-graph-viewer "firefox")
(setq org-roam-directory (file-truename "~/org/website/mindmap"))
(setq org-roam-capture-templates '(("d" "default" plain "%?"
- :target (file+head "${title}.org"
- "#+title: ${title}\n#+author: Preston Pan\n#+html_head: <link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" />\n#+html_head: <script src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n#+html_head: <script id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>\n#+options: broken-links:t")
- :unnarrowed t))))
+ :target (file+head "${title}.org"
+ "#+title: ${title}\n#+author: Preston Pan\n#+html_head: <link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" />\n#+html_head: <script src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n#+html_head: <script id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>\n#+options: broken-links:t")
+ :unnarrowed t)))
+ :config
+ (org-roam-db-autosync-mode))
#+end_src
** Pinentry
Set up pinentry so that I can use emacs as my pinentry frontend: