Skip to content

Commit

Permalink
Extend the set of tags highlighted in comments (helix-editor#6143)
Browse files Browse the repository at this point in the history
  • Loading branch information
isti115 authored and estin committed Mar 4, 2023
1 parent efeb504 commit 0deec6c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions runtime/queries/comment/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,33 @@

":" @punctuation.delimiter

; Hint level tags
((tag (name) @hint)
(#match? @hint "^(HINT|MARK)$"))

("text" @hint
(#match? @hint "^(HINT|MARK)$"))

; Info level tags
((tag (name) @info)
(#match? @info "^(INFO|NOTE|TODO)$"))

("text" @info
(#match? @info "^(INFO|NOTE|TODO)$"))

; Warning level tags
((tag (name) @warning)
(#match? @warning "^(TODO|HACK|WARNING)$"))
(#match? @warning "^(HACK|WARN|WARNING)$"))

("text" @warning
(#match? @warning "^(TODO|HACK|WARNING)$"))
(#match? @warning "^(HACK|WARN|WARNING)$"))

; Error level tags
((tag (name) @error)
(match? @error "^(FIXME|XXX|BUG)$"))
(match? @error "^(BUG|FIXME|ISSUE|XXX)$"))

("text" @error
(match? @error "^(FIXME|XXX|BUG)$"))
(match? @error "^(BUG|FIXME|ISSUE|XXX)$"))

(tag
(name) @ui.text
Expand Down

0 comments on commit 0deec6c

Please sign in to comment.