lang/org: fontify checked checbox items with 'org-headline-done'
This commit is contained in:
parent
8ad27c4d8e
commit
48dcdbfec7
1 changed files with 15 additions and 2 deletions
|
@ -181,9 +181,22 @@
|
||||||
'((t (:inherit font-lock-keyword-face)))
|
'((t (:inherit font-lock-keyword-face)))
|
||||||
"Face for list bullets"
|
"Face for list bullets"
|
||||||
:group 'doom)
|
:group 'doom)
|
||||||
|
;; I like how org-mode fontifies checked TODOs and want this to extend to
|
||||||
|
;; checked checkbox items, so we remove the old checkbox highlight rule...
|
||||||
|
(font-lock-remove-keywords
|
||||||
|
'org-mode
|
||||||
|
'(("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- X]\\]\\)"
|
||||||
|
1 'org-checkbox prepend)))
|
||||||
(font-lock-add-keywords
|
(font-lock-add-keywords
|
||||||
'org-mode '(("^ *\\([-+]\\|[0-9]+[).]\\) " (1 'org-list-bullet))
|
'org-mode '(;; ...and replace it with my own
|
||||||
("^ *\\(-----+\\)$" (1 'org-meta-line))))
|
("^[ \t]*\\(\\(?:[-+]\\|[0-9]+[).]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[X\\][^\n]*\n\\)"
|
||||||
|
1 'org-headline-done t)
|
||||||
|
("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- ]\\]\\)"
|
||||||
|
1 'org-checkbox prepend)
|
||||||
|
;; Also highlight list bullets
|
||||||
|
("^ *\\([-+]\\|[0-9]+[).]\\) " 1 'org-list-bullet append)
|
||||||
|
;; and separators
|
||||||
|
("^ *\\(-----+\\)$" 1 'org-meta-line)))
|
||||||
|
|
||||||
;; Enable gpg support
|
;; Enable gpg support
|
||||||
(require 'epa-file)
|
(require 'epa-file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue