Skip to content

Commit

Permalink
fix(org): compat with org-modern horizontal rules through disable switch
Browse files Browse the repository at this point in the history
org-modern fontifies horizontal rules using org-modern-horizontal-rule.
doom-themes does so too but using org-meta-line.

to resolve this conflict, add a switch to disable doom-themes fontifications.
  • Loading branch information
TheJJ committed Feb 7, 2024
1 parent ff26f26 commit b5fadff
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions extensions/doom-themes-ext-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ See `doom-themes-org-fontify-special-tags'."
:type '(repeat symbol)
:group 'doom-themes-org)

(defcustom doom-themes-org-fontify-horizontal-rule t
"If non-nil, fontify horizontal rules defined by 5 or more dashes."
:type 'boolean
:group 'doom-themes-org)

(defface doom-themes-org-at-tag '((t :inherit org-formula))
"Face used to fontify @-tags in org-mode."
:group 'doom-themes-org)
Expand All @@ -54,6 +59,10 @@ See `doom-themes-org-fontify-special-tags'."
"Face used to fontify #hashtags in org-mode."
:group 'doom-themes-org)

(defface doom-themes-org-horizontal-rule '((t :inherit org-meta-line))
"Face used to fontify horizontal rules in org-mode."
:group 'doom-themes-org)


(defvar org-done-keywords)
(defvar org-font-lock-extra-keywords)
Expand Down Expand Up @@ -120,9 +129,10 @@ N is the match index."
("^\\( *\\)\\([-+]\\|\\(?:[0-9]+\\|[a-zA-Z]\\)[).]\\)\\([ \t]\\)"
(1 'org-indent append)
(2 'org-list-dt append)
(3 'org-indent append))
(3 'org-indent append)))
(when doom-themes-org-fontify-horizontal-rule
;; and separators/dividers
("^ *\\(-----+\\)$" 1 'org-meta-line))
'(("^ *\\(-----+\\)$" 1 'doom-themes-org-horizontal-rule)))
;; I like how org-mode fontifies checked TODOs and want this to
;; extend to checked checkbox items:
(when org-fontify-done-headline
Expand Down

0 comments on commit b5fadff

Please sign in to comment.