From 015ed00b0f39fd2cad2abc440e7f4afc95050b70 Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Tue, 27 May 2025 12:04:47 +0200 Subject: [PATCH] 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. --- config.org | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/config.org b/config.org index 994938c..eb1224f 100644 --- a/config.org +++ b/config.org @@ -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