doomemacs/modules/ui/hl-todo/README.org
Jeetaditya Chatterjee 51b47d0fa6 Redoing ui/hl-todo README
Redid the README so it fits the new format
2020-08-22 02:38:12 +01:00

2.6 KiB

:ui hl-todo

Description

This module adds syntax highlighting for TODO/FIXME/NOTE tags in programming major-modes.

Module Flags

This module provides no flags

Plugins

Prerequisites

This module has no prerequisites

Features

Making Items

You can make a TODO item by simply writing

  • TODO For things that need to be done, just not today.
  • HACK For tidbits that are unconventional and not intended uses of the constituent parts, and may break in a future update.
  • FIXME For problems that will become bigger problems later if not fixed ASAP.
  • REVIEW for things that were done hastily and/or hasn't been thoroughly tested. it may not even be necessary!
  • NOTE For especially important gotchas with a given implementation, directed at another user other than the author.
  • DEPRECATED For things that just gotta go and will soon be gone.
  • BUG For a known bug that needs a workaround
  • XXX For warning about a problematic or misguiding code

Using Items

To see all of the TODO items in a project you can use SPC p t This will bring up a buffer you can use to quickly jump to the item

Configuration

To add your own ITEMS you would need to configure them using hl-todo-keyword-faces

;; the default
(setq hl-todo-keyword-faces
      `(("FOO"  . ,(face-foreground "MY COLOUR HEX CODE"))
        ("BAR" . ,(face-foreground 'my-colour-var))))

You can also add keybindings to jump and configure the next TODO item in the buffer using

function description proposed binding
hl-todo-previous move to the last TODO item C-c t p
hl-todo-next move to the next TODO item C-c t n
hl-todo-occur list all TODO items in the buffer C-c t o
hl-todo-insert make a new TODO item C-c t i

this can be mapped like this

(map! :prefix "C-c t"
    "p"#'hl-todo-previous
    "n"#'hl-todo-next
    "o"#'hl-todo-occur
    "i"#'hl-todo-insert)

Troubleshooting

If you have any problems with this module do get in touch!