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/perl | |
| 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/perl')
| -rw-r--r-- | queries/perl/highlights.scm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/queries/perl/highlights.scm b/queries/perl/highlights.scm index 1b0dc2dc1..fcd0f3071 100644 --- a/queries/perl/highlights.scm +++ b/queries/perl/highlights.scm @@ -65,7 +65,7 @@ (yadayada) @keyword.exception (phaser_statement - phase: _ @keyword.phaser) + phase: _ @keyword) [ "or" @@ -207,50 +207,50 @@ ; highlights punc vars and also numeric only like $11 (#lua-match? @variable.builtin "^%A+$")) -(scalar) @variable.scalar +(scalar) @variable (scalar_deref_expression [ "$" "*" - ] @variable.scalar) + ] @variable) [ (array) (arraylen) -] @variable.array +] @variable (array_deref_expression [ "@" "*" - ] @variable.array) + ] @variable) -(hash) @variable.hash +(hash) @variable (hash_deref_expression [ "%" "*" - ] @variable.hash) + ] @variable) (array_element_expression - array: (_) @variable.array) + array: (_) @variable) (slice_expression - array: (_) @variable.array) + array: (_) @variable) (keyval_expression - array: (_) @variable.array) + array: (_) @variable) (hash_element_expression - hash: (_) @variable.hash) + hash: (_) @variable) (slice_expression - hash: (_) @variable.hash) + hash: (_) @variable) (keyval_expression - hash: (_) @variable.hash) + hash: (_) @variable) (comment) @comment |
