feat: refactor org mode configuration

Defer loading to speed up startup and combine all the configuration of
org mode in the same block.

org-ellipsis is newly added and gives some eye candy when org blocks
are folded.
This commit is contained in:
Laurens Miers 2025-05-27 12:04:47 +02:00
parent 980ce6750b
commit 015ed00b0f

View file

@ -877,26 +877,27 @@ https://github.com/remyferre/comment-dwim-2
(add-hook 'project-find-functions #'project-projectile)
)
#+END_SRC
* Org
** General config
*** Super/Sub-scripts
Use ={}= for subscripting:
https://orgmode.org/manual/Subscripts-and-superscripts.html
#+BEGIN_SRC emacs-lisp
(setq org-use-sub-superscripts '{})
#+END_SRC
*** Indentation
Preserve indentation in SRC blocks
#+BEGIN_SRC emacs-lisp
(setq org-src-preserve-indentation t)
(use-package org
:ensure nil
:defer t
:mode ("\\.org\\'" . org-mode)
:config
(setq
;; Start collapsed for speed
org-startup-folded t
;; Use ={}= for subscripting: https://orgmode.org/manual/Subscripts-and-superscripts.html
org-use-sub-superscripts '{}
;; Preserve indentation in SRC blocks
org-src-preserve-indentation t
)
;; Ellipsis styling
(setq org-ellipsis " ▼ ")
(set-face-attribute 'org-ellipsis nil :inherit 'default :box nil))
#+END_SRC
** Org-todo