aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorObserverOfTime <chronobserver@disroot.org>2022-10-17 20:09:56 +0300
committerObserverOfTime <chronobserver@disroot.org>2022-11-26 13:17:51 +0200
commit53c26dd4af08d0a8cb59d8deb34049bf4761d707 (patch)
tree7fbc02e11e3e3daa337f643121eb1aa894bb875a /queries
parenthighlights(gitattributes): fix captures (diff)
downloadnvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.tar
nvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.tar.gz
nvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.tar.bz2
nvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.tar.lz
nvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.tar.xz
nvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.tar.zst
nvim-treesitter-53c26dd4af08d0a8cb59d8deb34049bf4761d707.zip
highlights(comment): improve note tags
Diffstat (limited to 'queries')
-rw-r--r--queries/comment/highlights.scm29
1 files changed, 20 insertions, 9 deletions
diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm
index e516c6037..66bc99cc7 100644
--- a/queries/comment/highlights.scm
+++ b/queries/comment/highlights.scm
@@ -7,27 +7,38 @@
":" @punctuation.delimiter
-(tag (name) @text.note (user)? @constant)
+(tag
+ (name) @text.todo
+ (user)? @constant)
+
+((tag ((name) @text.todo))
+ (#eq? @text.todo "TODO"))
+
+("text" @text.todo
+ (#eq? @text.todo "TODO"))
((tag ((name) @text.note))
- (#any-of? @text.note "NOTE"))
+ (#any-of? @text.note "NOTE" "XXX"))
("text" @text.note
- (#any-of? @text.note "NOTE"))
+ (#any-of? @text.note "NOTE" "XXX"))
((tag ((name) @text.warning))
- (#any-of? @text.warning "TODO" "HACK" "WARNING"))
+ (#any-of? @text.warning "HACK" "WARNING"))
("text" @text.warning
- (#any-of? @text.warning "TODO" "HACK" "WARNING"))
+ (#any-of? @text.warning "HACK" "WARNING"))
((tag ((name) @text.danger))
- (#any-of? @text.danger "FIXME" "XXX" "BUG"))
+ (#any-of? @text.danger "FIXME" "BUG"))
("text" @text.danger
- (#any-of? @text.danger "FIXME" "XXX" "BUG"))
+ (#any-of? @text.danger "FIXME" "BUG"))
; Issue number (#123)
-("text" @number (#lua-match? @number "^#[0-9]+$"))
+("text" @number
+ (#lua-match? @number "^#[0-9]+$"))
+
; User mention (@user)
-("text" @constant (#lua-match? @constant "^[@][a-zA-Z0-9_-]+$"))
+("text" @constant
+ (#lua-match? @constant "^[@][a-zA-Z0-9_-]+$"))