From be80e8b8385f34318b84e1870d6851d300aeb37e Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Fri, 7 Jan 2022 03:37:34 +0100 Subject: [PATCH] [Emacs] Add hl-todo configuration --- org/config/emacs.org | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/org/config/emacs.org b/org/config/emacs.org index 72fcc74..70009fc 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -2441,10 +2441,30 @@ doing and what Git is doing! In short, I absolutely love it! [[https://github.com/alphapapa][Alphapapa]] also created an awesome package for Magit: magit-todos which display in the Magit buffer a list of TODOs found in the current project to remind you of what to do next. + +But first, let’s setup our todo keywords with ~hl-todo~. A good few todo +keywords are already defined in the ~hl-todo-keyword-faces~ variable. +Why not use them? ~hl-todo-mode~ enables fontlock highlight of these +keywords in a buffer. Let’s enable this mode globally. +#+begin_src emacs-lisp +(use-package hl-todo + :defer t + :straight (:build t) + :init (global-hl-todo-mode 1) + :general + (phundrak/leader-key + :packages '(hl-todo) + :infix "c" + "" '(:ignore t :which-key "todos") + "n" #'hl-todo-next + "p" #'hl-todo-previous)) +#+end_src + +We can now configure properly ~magit-todos~. #+begin_src emacs-lisp (use-package magit-todos :straight (:build t) - :after magit + :after (magit hl-todo) :config (setq magit-todos-ignore-case t)) #+end_src