aboutsummaryrefslogtreecommitdiffstats
path: root/queries/vimdoc
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-03-03 11:00:11 +0100
committerGitHub <noreply@github.com>2024-03-03 11:00:11 +0100
commit99ddf573531c4dbe53f743ecbc1595af5eb1d32f (patch)
treebb70e8d72e309554c50aee3807c51f2a0433cbfe /queries/vimdoc
parentci: teach bot about conventional commits (diff)
downloadnvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.tar
nvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.tar.gz
nvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.tar.bz2
nvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.tar.lz
nvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.tar.xz
nvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.tar.zst
nvim-treesitter-99ddf573531c4dbe53f743ecbc1595af5eb1d32f.zip
feat(highlights)!: enforce documented captures (#6232)
Problem: Allowing undocumented "secret" (sub)captures makes it harder to write comprehensive colorschemes and catch inconsistent captures. Solution: Only allow captures listed in CONTRIBUTING.md. Add useful (cross-language) subcaptures and drop language-specific or too niche ones. Follow-up: Adding further `*.builtin` captures and changing queries to use them. Language-specific subcaptures should instead be added in user config or a custom language plugin.
Diffstat (limited to 'queries/vimdoc')
-rw-r--r--queries/vimdoc/highlights.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/queries/vimdoc/highlights.scm b/queries/vimdoc/highlights.scm
index 294fa94f1..21b2b98c6 100644
--- a/queries/vimdoc/highlights.scm
+++ b/queries/vimdoc/highlights.scm
@@ -7,11 +7,11 @@
(column_heading) @markup.heading.4
(column_heading
- "~" @markup.heading.4.marker
+ "~" @markup.heading.4
(#set! conceal ""))
(tag
- "*" @markup.heading.5.marker
+ "*" @label
(#set! conceal "")
text: (_) @label)
@@ -24,7 +24,7 @@
text: (_) @markup.link)
(codespan
- "`" @markup.raw.delimiter
+ "`" @markup.raw
(#set! conceal "")
text: (_) @markup.raw)
@@ -32,14 +32,15 @@
(#set! "priority" 90))
(codeblock
- [
- ">"
- (language)
- ] @markup.raw.delimiter
+ ">" @markup.raw
+ (#set! conceal ""))
+
+(codeblock
+ (language) @label
(#set! conceal ""))
(block
- "<" @markup.raw.delimiter
+ "<" @markup.raw
(#set! conceal ""))
(argument) @variable.parameter