mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(comments)!: consolidate note captures
Distinguishing `hint` and `info` is too confusing; it's enough to have `error`, `warning`, `todo`, and `note`.
This commit is contained in:
parent
64b3d5e569
commit
5cc5627487
4 changed files with 9 additions and 10 deletions
|
|
@ -193,11 +193,10 @@ As languages differ quite a lot, here is a set of captures available to you when
|
||||||
@comment ; line and block comments
|
@comment ; line and block comments
|
||||||
@comment.documentation ; comments documenting code
|
@comment.documentation ; comments documenting code
|
||||||
|
|
||||||
@comment.error ; error-type comments (e.g., `DEPRECATED:`)
|
@comment.error ; error-type comments (e.g. `ERROR`, `FIXME`, `DEPRECATED:`)
|
||||||
@comment.warning ; warning-type comments (e.g., `WARNING:`, `FIX:`)
|
@comment.warning ; warning-type comments (e.g. `WARNING:`, `FIX:`, `HACK:`)
|
||||||
@comment.hint ; note-type comments (e.g., `NOTE:`)
|
@comment.todo ; todo-type comments (e.g. `TODO:`, `WIP:`, `FIXME:`)
|
||||||
@comment.info ; info-type comments
|
@comment.note ; note-type comments (e.g. `NOTE:`, `INFO:`, `XXX`)
|
||||||
@comment.todo ; todo-type comments (e.g-, `TODO:`, `WIP:`)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Markup
|
#### Markup
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
(user) @constant
|
(user) @constant
|
||||||
")" @punctuation.bracket)?
|
")" @punctuation.bracket)?
|
||||||
":" @punctuation.delimiter)
|
":" @punctuation.delimiter)
|
||||||
(#any-of? @comment.todo "TODO" "WIP"))
|
(#any-of? @comment.todo "TODO" "WIP" "FIXME"))
|
||||||
|
|
||||||
("text" @comment.todo @nospell
|
("text" @comment.todo @nospell
|
||||||
(#any-of? @comment.todo "TODO" "WIP"))
|
(#any-of? @comment.todo "TODO" "WIP" "FIXME"))
|
||||||
|
|
||||||
((tag
|
((tag
|
||||||
(name) @comment.note @nospell
|
(name) @comment.note @nospell
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
; (trailer (value) @none)
|
; (trailer (value) @none)
|
||||||
(breaking_change
|
(breaking_change
|
||||||
(token) @comment.warning)
|
(token) @comment.error)
|
||||||
|
|
||||||
(breaking_change
|
(breaking_change
|
||||||
(value) @none @spell)
|
(value) @none @spell)
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,8 @@
|
||||||
|
|
||||||
(url) @string.special.url
|
(url) @string.special.url
|
||||||
|
|
||||||
((note) @comment.hint
|
((note) @comment.note
|
||||||
(#any-of? @comment.hint "Note:" "NOTE:" "Notes:"))
|
(#any-of? @comment.note "Note:" "NOTE:" "Notes:"))
|
||||||
|
|
||||||
((note) @comment.warning
|
((note) @comment.warning
|
||||||
(#any-of? @comment.warning "Warning:" "WARNING:"))
|
(#any-of? @comment.warning "Warning:" "WARNING:"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue