comment(highlights): add @nospell to tags and user mentions

This commit is contained in:
Yochem van Rosmalen 2023-03-01 14:26:52 +01:00 committed by Amaan Qureshi
parent 0572657d4d
commit 252c1011c4

View file

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