nvim-treesitter/queries/comment/highlights.scm
Santos Gallegos 48f4f3ead1
feat(comment): add support for URIs
https and https links are recognized now
ref https://github.com/stsewd/tree-sitter-comment/pull/21
2023-06-04 00:03:09 -04:00

43 lines
1.1 KiB
Scheme

(_) @spell
((tag
(name) @text.todo @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
(#eq? @text.todo "TODO"))
("text" @text.todo @nospell
(#eq? @text.todo "TODO"))
((tag
(name) @text.note @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
(#any-of? @text.note "NOTE" "XXX"))
("text" @text.note @nospell
(#any-of? @text.note "NOTE" "XXX"))
((tag
(name) @text.warning @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
(#any-of? @text.warning "HACK" "WARNING"))
("text" @text.warning @nospell
(#any-of? @text.warning "HACK" "WARNING"))
((tag
(name) @text.danger @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
(#any-of? @text.danger "FIXME" "BUG"))
("text" @text.danger @nospell
(#any-of? @text.danger "FIXME" "BUG"))
; Issue number (#123)
("text" @number
(#lua-match? @number "^#[0-9]+$"))
((uri) @text.uri @nospell)