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 @@
(comment) @comment

View file

@ -1 +1,3 @@
(preproc_arg) @c
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

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

View file

@ -1 +1,3 @@
(preproc_arg) @cpp
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -8,3 +8,5 @@
((script_element
(raw_text) @javascript))
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -1,2 +1,4 @@
((triple_string) @markdown
(#offset! @markdown 0 3 0 -3))
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -8,3 +8,5 @@
(#eq? @_cdef_identifier "cdef")
)
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
; inherits: ocaml

View file

@ -1 +1,3 @@
((ocaml) @ocaml)
(ocaml) @ocaml
(comment) @comment

View file

@ -1 +1,3 @@
((text) @html)
(text) @html
(comment) @comment

View file

@ -22,3 +22,5 @@
; Attribute docstring
(((expression_statement (assignment)) . (expression_statement (string) @rst))
(#offset! @rst 0 3 0 -3))
(comment) @comment

View file

@ -0,0 +1,5 @@
[
(line_comment)
(block_comment)
(qldoc)
] @comment

View file

@ -2,3 +2,5 @@
name: (identifier) @_name
parameters: (parameters (string) @regex))
(#match? @_name "^#?(not-)?(match|vim-match|lua-match)$"))
(comment) @comment

View file

@ -58,3 +58,5 @@
"interpreted_text" @latex
(role) @_role)
(#eq? @_role ":math:"))
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -5,3 +5,8 @@
(macro_rule
left: (token_tree_pattern) @rust
right: (token_tree) @rust))
[
(line_comment)
(block_comment)
] @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1,4 @@
[
(line_comment)
(block_comment)
] @comment

View file

@ -19,3 +19,5 @@
(raw_text) @typescript)
(#match? @_lang "(ts|typescript)")
)
(comment) @comment

View file

@ -8,3 +8,5 @@
(#eq? @_cdef_identifier "cdef")
)
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment

View file

@ -17,3 +17,5 @@
((interpolation
(raw_text) @javascript))
(comment) @comment

View file

@ -0,0 +1 @@
(comment) @comment