Skip to content

claytonrcarter/zed-comment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zed-comment

Dynamic JSON Badge

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 as emphasis.

Ideally, the coloring would be supported by definitions like comment.info and comment.warning, but those aren't officially supported by Zed themes.

Installation

Search "zed-comment" in extension page, and install it.

Compatibility

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.

Credits

Thanks to tree-sitter-comment grammar.

About

A comment extension for the Zed editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Tree-sitter Query 100.0%