diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-03-03 11:00:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-03 11:00:11 +0100 |
| commit | 99ddf573531c4dbe53f743ecbc1595af5eb1d32f (patch) | |
| tree | bb70e8d72e309554c50aee3807c51f2a0433cbfe /queries/latex | |
| parent | ci: teach bot about conventional commits (diff) | |
| download | nvim-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/latex')
| -rw-r--r-- | queries/latex/highlights.scm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm index 5b5f19768..819a2ff94 100644 --- a/queries/latex/highlights.scm +++ b/queries/latex/highlights.scm @@ -41,16 +41,16 @@ ; General environments (begin - command: _ @markup.environment + command: _ @module name: (curly_group_text - (text) @markup.environment.name)) + (text) @label)) (end - command: _ @markup.environment + command: _ @module name: (curly_group_text - (text) @markup.environment.name)) + (text) @label)) ; Definitions and references (new_command_definition @@ -77,7 +77,7 @@ command: _ @function.macro name: (curly_group_text - (_) @markup.environment.name)) + (_) @label)) (paired_delimiter_definition command: _ @function.macro @@ -260,8 +260,8 @@ (begin name: (curly_group_text - (text) @markup.environment.name) - (#any-of? @markup.environment.name "frame")) + (text) @label) + (#any-of? @label "frame")) . (curly_group (_) @markup.heading)) |
