diff options
author | David Li <li.davidm96@gmail.com> | 2015-12-25 13:21:12 -0700 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2015-12-25 13:21:12 -0700 |
commit | 14c4eabd8d6ee28c87f51710f37006a358fb9f04 (patch) | |
tree | 6238b850e2430c30b705474e20ed7bab687d6071 | |
parent | 68706ce775f672a1015c0ab7cb75e9854fb685f0 (diff) |
Highlight TODOs
-rw-r--r-- | init.el | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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) |