summaryrefslogtreecommitdiff
path: root/queries/comment
diff options
context:
space:
mode:
Diffstat (limited to 'queries/comment')
-rw-r--r--queries/comment/highlights.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm
new file mode 100644
index 00000000..3a8e1d49
--- /dev/null
+++ b/queries/comment/highlights.scm
@@ -0,0 +1,19 @@
+[
+ "("
+ ")"
+] @punctuation.bracket
+
+":" @punctuation.delimiter
+
+(tag (name) @text.note (user)? @constant)
+
+((tag ((name) @text.warning))
+ (#match? @text.warning "^(TODO|HACK|WARNING)$"))
+
+((tag ((name) @text.danger))
+ (#match? @text.danger "^(FIXME|XXX|BUG)$"))
+
+; Issue number (#123)
+("text" @number (#match? @number "^#[0-9]+$"))
+; User mention (@user)
+("text" @constant (#match? @constant "^[@][a-zA-Z0-9_-]+$"))