Add comment parser to highlight comment tags (#893)

Closes #236
This commit is contained in:
Santos Gallegos 2021-03-12 11:21:46 -05:00 committed by GitHub
parent 3b8c2ea492
commit e4083fc8e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 126 additions and 3 deletions

View file

@ -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_-]+$"))