diff --git a/modules/org/org/config.el b/modules/org/org/config.el index 80092d0f1..57b76421f 100644 --- a/modules/org/org/config.el +++ b/modules/org/org/config.el @@ -132,51 +132,7 @@ (when (or (featurep! :completion ivy) (featurep! :completion helm)) (setq-default org-completion-use-ido nil - org-outline-path-complete-in-steps nil)) - - ;; Custom fontification - (defsubst +org--tag-face (n) - (let ((kwd (match-string n))) - (or (and (equal kwd "#") 'org-tag) - (and (equal kwd "@") 'org-special-keyword)))) - - (defun +org|init-custom-fontification () - "Correct (and improve) org-mode's font-lock keywords. - - 1. Re-set `org-todo' & `org-headline-done' faces, to make them respect - underlying faces. - 2. Fontify item bullets - 3. Fontify item checkboxes (and when they're marked done) - 4. Fontify dividers/separators (5+ dashes) - 5. Fontify #hashtags and @at-tags, for personal convenience" - (let ((org-todo (format org-heading-keyword-regexp-format - org-todo-regexp)) - (org-done (format org-heading-keyword-regexp-format - (concat "\\(?:" (mapconcat #'regexp-quote org-done-keywords "\\|") "\\)")))) - (setq - org-font-lock-extra-keywords - (append (org-delete-all - `(("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" - (0 (org-get-checkbox-statistics-face) t)) - (,org-todo (2 (org-get-todo-face 2) t)) - (,org-done (2 'org-headline-done t))) - org-font-lock-extra-keywords) - `((,org-todo (2 (org-get-todo-face 2) prepend)) - (,org-done (2 'org-headline-done prepend)) - ;; Make checkbox statistic cookies respect underlying faces - ("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" - (0 (org-get-checkbox-statistics-face) prepend)) - ;; I like how org-mode fontifies checked TODOs and want this to extend to - ;; checked checkbox items: - ("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" - 1 'org-headline-done prepend) - ;; make plain list bullets stand out - ("^ *\\([-+]\\|[0-9]+[).]\\) " 1 'org-list-dt append) - ;; and separators/dividers - ("^ *\\(-----+\\)$" 1 'org-meta-line) - ;; custom #hashtags & @at-tags for another level of organization - ("\\s-\\(\\([#@]\\)[^ \n.,]+\\)" 1 (+org--tag-face 2))))))) - (add-hook 'org-font-lock-set-keywords-hook #'+org|init-custom-fontification)) + org-outline-path-complete-in-steps nil))) (defun +org-init-keybinds () "Sets up org-mode and evil keybindings. Tries to fix the idiosyncrasies diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 289606db2..e10082d58 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -16,6 +16,9 @@ (load "doom-themes-common.el" nil t)) (add-hook 'doom-pre-reload-theme-hook #'+doom|reload-theme) + ;; improve integration with org-mode + (add-hook 'doom-init-ui-hook #'doom-themes-org-config) + ;; blink mode-line on errors (add-hook 'doom-init-ui-hook #'doom-themes-visual-bell-config)