diff options
| author | Santos Gallegos <stsewd@protonmail.com> | 2021-03-12 11:21:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-12 11:21:46 -0500 |
| commit | e4083fc8e11e6585f53d62eb71778cc2af464fad (patch) | |
| tree | 347c6f8cd36ce9d786c817697e8ac59c0a6bd4a5 /queries/comment | |
| parent | chore: create ecma base for use in js and ts which fixes jsx issues (diff) | |
| download | nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.tar nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.tar.gz nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.tar.bz2 nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.tar.lz nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.tar.xz nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.tar.zst nvim-treesitter-e4083fc8e11e6585f53d62eb71778cc2af464fad.zip | |
Add comment parser to highlight comment tags (#893)
Closes #236
Diffstat (limited to 'queries/comment')
| -rw-r--r-- | queries/comment/highlights.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm new file mode 100644 index 000000000..3a8e1d49d --- /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_-]+$")) |
