From 2345d195ff1d1803e650a29aed189ae8b9c4807a Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Wed, 31 Jan 2024 10:04:32 -0500 Subject: [PATCH] fix(emacs): add `hl-todo` configuration Signed-off-by: Lucas Sta Maria --- .emacs.d/include/misc.el | 21 +++++++++++++++++++++ .emacs.d/init.el | 3 +++ 2 files changed, 24 insertions(+) diff --git a/.emacs.d/include/misc.el b/.emacs.d/include/misc.el index 2a8ef85..541e734 100644 --- a/.emacs.d/include/misc.el +++ b/.emacs.d/include/misc.el @@ -161,6 +161,27 @@ (keymap-global-set "C-c r r" #'consult-ripgrep) (keymap-global-set "C-c r g" #'consult-grep) +;; hl-todo +(custom-set-faces + '(hl-todo ((t (:inherit nano-salient-i))))) +(setq hl-todo-keyword-faces + '(("HOLD" . "#ffffff") + ("TODO" . "#ffffff") + ("NEXT" . "#ffffff") + ("THEM" . "#ffffff") + ("PROG" . "#ffffff") + ("OKAY" . "#ffffff") + ("DONT" . "#ffffff") + ("FAIL" . "#ffffff") + ("DONE" . "#ffffff") + ("NOTE" . "#ffffff") + ("MAYBE" . "#ffffff") + ("KLUDGE" . "#ffffff") + ("HACK" . "#ffffff") + ("TEMP" . "#ffffff") + ("FIXME" . "#ffffff") + ("XXXX*" . "#ffffff"))) + ;; Grading (defun grade-next (&optional inc) "Go to the next homework by INC to grade." diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4c03cad..76fb788 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -40,6 +40,7 @@ (straight-use-package 'neotree) (straight-use-package 'all-the-icons) (straight-use-package 'git-gutter) +(straight-use-package 'hl-todo) (straight-use-package '(nano-theme :type git :host github :repo "rougier/nano-theme")) @@ -147,6 +148,8 @@ (add-hook 'company-mode-hook 'company-box-mode) (add-hook 'prog-mode-hook #'git-gutter-mode) +(add-hook 'prog-mode-hook #'hl-todo-mode) + (add-hook 'racket-mode-hook #'lsp) (add-hook 'rustic-mode-hook #'lsp) (add-hook 'python-mode-hook #'lsp)