Replace some custom TODO & friends highlighting with the hl-todo
package
This commit is contained in:
parent
82f496f195
commit
d6842eccad
3 changed files with 6 additions and 24 deletions
|
@ -63,19 +63,6 @@ PROMPT sets the `read-string prompt."
|
|||
(prelude-install-search-engine "github" "https://github.com/search?q=" "Search GitHub: ")
|
||||
(prelude-install-search-engine "duckduckgo" "https://duckduckgo.com/?t=lm&q=" "Search DuckDuckGo: ")
|
||||
|
||||
(defun prelude-todo-ov-evaporate (_ov _after _beg _end &optional _length)
|
||||
(let ((inhibit-modification-hooks t))
|
||||
(if _after (ov-reset _ov))))
|
||||
|
||||
(defun prelude-annotate-todo ()
|
||||
"Put fringe marker on TODO: lines in the current buffer."
|
||||
(interactive)
|
||||
(ov-set (format "[[:space:]]*%s+[[:space:]]*TODO:" comment-start)
|
||||
'before-string
|
||||
(propertize (format "A")
|
||||
'display '(left-fringe right-triangle))
|
||||
'modification-hooks '(prelude-todo-ov-evaporate)))
|
||||
|
||||
(defun prelude-recompile-init ()
|
||||
"Byte-compile all your dotfiles again."
|
||||
(interactive)
|
||||
|
|
|
@ -75,8 +75,8 @@
|
|||
god-mode
|
||||
grizzl
|
||||
guru-mode
|
||||
hl-todo
|
||||
imenu-anywhere
|
||||
ov
|
||||
projectile
|
||||
magit
|
||||
move-text
|
||||
|
|
|
@ -35,18 +35,14 @@
|
|||
(defun prelude-local-comment-auto-fill ()
|
||||
(set (make-local-variable 'comment-auto-fill-only-comments) t))
|
||||
|
||||
(defun prelude-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\\):\\)"
|
||||
1 font-lock-warning-face t))))
|
||||
|
||||
;; show the name of the current function definition in the modeline
|
||||
(require 'which-func)
|
||||
(which-function-mode 1)
|
||||
|
||||
;; font-lock annotations like TODO in source code
|
||||
(require 'hl-todo)
|
||||
(global-hl-todo-mode 1)
|
||||
|
||||
;; in Emacs 24 programming major modes generally derive from a common
|
||||
;; mode named prog-mode; for others, we'll arrange for our mode
|
||||
;; defaults function to run prelude-prog-mode-hook directly. To
|
||||
|
@ -74,8 +70,7 @@ This functions should be added to the hooks of major modes for programming."
|
|||
(guru-mode +1))
|
||||
(smartparens-mode +1)
|
||||
(prelude-enable-whitespace)
|
||||
(prelude-local-comment-auto-fill)
|
||||
(prelude-font-lock-comment-annotations))
|
||||
(prelude-local-comment-auto-fill))
|
||||
|
||||
(setq prelude-prog-mode-hook 'prelude-prog-mode-defaults)
|
||||
|
||||
|
|
Loading…
Reference in a new issue