Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/comment/highlights.scm')
-rw-r--r--runtime/queries/comment/highlights.scm31
1 files changed, 18 insertions, 13 deletions
diff --git a/runtime/queries/comment/highlights.scm b/runtime/queries/comment/highlights.scm
index 56c1fd7d..3b25531a 100644
--- a/runtime/queries/comment/highlights.scm
+++ b/runtime/queries/comment/highlights.scm
@@ -1,34 +1,41 @@
-(tag
- (name) @ui.text
- (user)? @constant)
+[
+ "("
+ ")"
+] @punctuation.bracket
+
+":" @punctuation.delimiter
; Hint level tags
((tag (name) @hint)
- (#any-of? @hint "HINT" "MARK" "PASSED" "STUB" "MOCK"))
+ (#match? @hint "^(HINT|MARK)$"))
("text" @hint
- (#any-of? @hint "HINT" "MARK" "PASSED" "STUB" "MOCK"))
+ (#match? @hint "^(HINT|MARK)$"))
; Info level tags
((tag (name) @info)
- (#any-of? @info "INFO" "NOTE" "TODO" "PERF" "OPTIMIZE" "PERFORMANCE" "QUESTION" "ASK"))
+ (#match? @info "^(INFO|NOTE|TODO)$"))
("text" @info
- (#any-of? @info "INFO" "NOTE" "TODO" "PERF" "OPTIMIZE" "PERFORMANCE" "QUESTION" "ASK"))
+ (#match? @info "^(INFO|NOTE|TODO)$"))
; Warning level tags
((tag (name) @warning)
- (#any-of? @warning "HACK" "WARN" "WARNING" "TEST" "TEMP"))
+ (#match? @warning "^(HACK|WARN|WARNING)$"))
("text" @warning
- (#any-of? @warning "HACK" "WARN" "WARNING" "TEST" "TEMP"))
+ (#match? @warning "^(HACK|WARN|WARNING)$"))
; Error level tags
((tag (name) @error)
- (#any-of? @error "BUG" "FIXME" "ISSUE" "XXX" "FIX" "SAFETY" "FIXIT" "FAILED" "DEBUG" "INVARIANT" "COMPLIANCE"))
+ (match? @error "^(BUG|FIXME|ISSUE|XXX)$"))
("text" @error
- (#any-of? @error "BUG" "FIXME" "ISSUE" "XXX" "FIX" "SAFETY" "FIXIT" "FAILED" "DEBUG" "INVARIANT" "COMPLIANCE"))
+ (match? @error "^(BUG|FIXME|ISSUE|XXX)$"))
+
+(tag
+ (name) @ui.text
+ (user)? @constant)
; Issue number (#123)
("text" @constant.numeric
@@ -37,5 +44,3 @@
; User mention (@user)
("text" @tag
(#match? @tag "^[@][a-zA-Z0-9_-]+$"))
-
-(uri) @markup.link.url