An extension for the Zed text editor to highlight according to the corresponding theme color comments beginning with:
- TODO:, WIP: (
constant) - NOTE:, XXX:, INFO:, DOCS:, PERF:, TEST: (
emphasis) - FIXME:, BUG:, ERROR: (
property) - HACK:, WARNING:, WARN:, FIX: (
keyword) - If the comment has a user in it (like
TODO(thedadams)), then they user will be highlighted asemphasis.
Ideally, the coloring would be supported by definitions like comment.info and comment.warning, but those aren't officially supported by Zed themes.
Search "zed-comment" in extension page, and install it.
This extension provides a new "language" called comment. In order for comments to be properly highlighted, this language must be injected into other languages. To do this, the following must be added to the injections.scm file:
((comment) @content
(#set! injection.language "comment")
)See the Dockerfile plugin as an example.
Thanks to tree-sitter-comment grammar.