summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2015-12-25 13:21:12 -0700
committerDavid Li <li.davidm96@gmail.com>2015-12-25 13:21:12 -0700
commit14c4eabd8d6ee28c87f51710f37006a358fb9f04 (patch)
tree6238b850e2430c30b705474e20ed7bab687d6071
parent68706ce775f672a1015c0ab7cb75e9854fb685f0 (diff)
Highlight TODOs
-rw-r--r--init.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/init.el b/init.el
index 35bac48..75e5f22 100644
--- a/init.el
+++ b/init.el
@@ -42,6 +42,19 @@
(global-whitespace-mode 1)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
+;; fixmes
+
+(defun font-lock-comment-annotations ()
+ "Highlight a bunch of well known comment annotations.
+
+This functions should be added to the hooks of major modes for programming."
+ (font-lock-add-keywords
+ nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\|OPTIMIZE\\|HACK\\|REFACTOR\\|XXX\\):"
+ 1 font-lock-warning-face t))))
+
+(add-hook 'prog-mode-hook 'font-lock-comment-annotations)
+
+
;; evil
(require 'evil)
(evil-mode 1)