From 60d61f1f4ca2f1bcde2c89f6ee23c24f32d74599 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 19 Oct 2018 09:25:16 +0200 Subject: [PATCH] Highlight checkboxes in Org mode Checked and unchecked checkboxes will have the same color as the DONE and TODO keywords, respectively. --- configuration.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configuration.org b/configuration.org index 5249e2c..e5a7bad 100644 --- a/configuration.org +++ b/configuration.org @@ -2377,6 +2377,20 @@ This is a big one; I use a lot of customisation here. :demand :init (require 'xdg-paths) + (defface org-checkbox-todo-text + '((t (:inherit org-todo))) + "Face for the text part of an unchecked org-mode checkbox.") + (defface org-checkbox-done-text + '((t (:inherit org-done))) + "Face for the text part of a checked org-mode checkbox.") + (font-lock-add-keywords + 'org-mode + `(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?: \\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 1 'org-checkbox-todo-text prepend)) + 'append) + (font-lock-add-keywords + 'org-mode + `(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 12 'org-checkbox-done-text prepend)) + 'append) (setq-default org-crypt-key "B0740C4C" org-default-notes-file (concat user-documents-directory (convert-standard-filename