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) (add-hook 'project-find-functions #'project-projectile)
) )
#+END_SRC #+END_SRC
* Org * Org
** General config ** General config
*** Super/Sub-scripts
Use ={}= for subscripting:
https://orgmode.org/manual/Subscripts-and-superscripts.html
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-use-sub-superscripts '{}) (use-package org
#+END_SRC :ensure nil
:defer t
*** Indentation :mode ("\\.org\\'" . org-mode)
:config
Preserve indentation in SRC blocks (setq
;; Start collapsed for speed
#+BEGIN_SRC emacs-lisp org-startup-folded t
(setq org-src-preserve-indentation 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 #+END_SRC
** Org-todo ** Org-todo