aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-01-20 17:41:40 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-01-20 17:52:50 +0100
commit5cc562748729b6dc9563ea5a3d676ff102ab38b1 (patch)
tree8a25ac5cceb594ac19aa464dd04b082058fb5ded
parentfeat: add the php_only parser included in tree-sitter-php (#5876) (diff)
downloadnvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.tar
nvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.tar.gz
nvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.tar.bz2
nvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.tar.lz
nvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.tar.xz
nvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.tar.zst
nvim-treesitter-5cc562748729b6dc9563ea5a3d676ff102ab38b1.zip
fix(comments)!: consolidate note captures
Distinguishing `hint` and `info` is too confusing; it's enough to have `error`, `warning`, `todo`, and `note`.
-rw-r--r--CONTRIBUTING.md9
-rw-r--r--queries/comment/highlights.scm4
-rw-r--r--queries/gitcommit/highlights.scm2
-rw-r--r--queries/vimdoc/highlights.scm4
4 files changed, 9 insertions, 10 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c29994f18..ca681832a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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.documentation ; comments documenting code
-@comment.error ; error-type comments (e.g., `DEPRECATED:`)
-@comment.warning ; warning-type comments (e.g., `WARNING:`, `FIX:`)
-@comment.hint ; note-type comments (e.g., `NOTE:`)
-@comment.info ; info-type comments
-@comment.todo ; todo-type comments (e.g-, `TODO:`, `WIP:`)
+@comment.error ; error-type comments (e.g. `ERROR`, `FIXME`, `DEPRECATED:`)
+@comment.warning ; warning-type comments (e.g. `WARNING:`, `FIX:`, `HACK:`)
+@comment.todo ; todo-type comments (e.g. `TODO:`, `WIP:`, `FIXME:`)
+@comment.note ; note-type comments (e.g. `NOTE:`, `INFO:`, `XXX`)
```
#### Markup
diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm
index 6556ec557..1c663735b 100644
--- a/queries/comment/highlights.scm
+++ b/queries/comment/highlights.scm
@@ -4,10 +4,10 @@
(user) @constant
")" @punctuation.bracket)?
":" @punctuation.delimiter)
- (#any-of? @comment.todo "TODO" "WIP"))
+ (#any-of? @comment.todo "TODO" "WIP" "FIXME"))
("text" @comment.todo @nospell
- (#any-of? @comment.todo "TODO" "WIP"))
+ (#any-of? @comment.todo "TODO" "WIP" "FIXME"))
((tag
(name) @comment.note @nospell
diff --git a/queries/gitcommit/highlights.scm b/queries/gitcommit/highlights.scm
index 880d05e01..8f7036a7e 100644
--- a/queries/gitcommit/highlights.scm
+++ b/queries/gitcommit/highlights.scm
@@ -44,7 +44,7 @@
; (trailer (value) @none)
(breaking_change
- (token) @comment.warning)
+ (token) @comment.error)
(breaking_change
(value) @none @spell)
diff --git a/queries/vimdoc/highlights.scm b/queries/vimdoc/highlights.scm
index ed8e84a90..294fa94f1 100644
--- a/queries/vimdoc/highlights.scm
+++ b/queries/vimdoc/highlights.scm
@@ -48,8 +48,8 @@
(url) @string.special.url
-((note) @comment.hint
- (#any-of? @comment.hint "Note:" "NOTE:" "Notes:"))
+((note) @comment.note
+ (#any-of? @comment.note "Note:" "NOTE:" "Notes:"))
((note) @comment.warning
(#any-of? @comment.warning "Warning:" "WARNING:"))