diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-02-16 17:29:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-16 17:29:56 +0100 |
| commit | 3c363ebd26a1da150108a3dd7c8ed3027dc20e85 (patch) | |
| tree | a9aa78707bfd47ce8fef41857d9c384a67ed04d4 | |
| parent | Update README (#2532) (diff) | |
| download | nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.tar nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.tar.gz nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.tar.bz2 nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.tar.lz nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.tar.xz nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.tar.zst nvim-treesitter-3c363ebd26a1da150108a3dd7c8ed3027dc20e85.zip | |
fix(latex): some highlight query fixes (#2534)
* add \caption to @function
* only highlight contents of curly text groups in references
| -rw-r--r-- | queries/latex/highlights.scm | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm index fff1e5b06..4e27f9021 100644 --- a/queries/latex/highlights.scm +++ b/queries/latex/highlights.scm @@ -2,6 +2,8 @@ (ERROR) @error (command_name) @function +(caption + command: _ @function) (key_value_pair key: (_) @parameter @@ -72,22 +74,22 @@ declaration: (_) @function) (theorem_definition - command: _ @function.macro - name: (curly_group_text (_) @text.environment.name)) + command: _ @function.macro + name: (curly_group_text (_) @text.environment.name)) (label_definition command: _ @function.macro - name: (_) @text.reference) + name: (curly_group_text (_) @text.reference)) (label_reference_range command: _ @function.macro - from: (_) @text.reference - to: (_) @text.reference) + from: (curly_group_text (_) @text.reference) + to: (curly_group_text (_) @text.reference)) (label_reference command: _ @function.macro - names: (_) @text.reference) + names: (curly_group_text_list (_) @text.reference)) (label_number command: _ @function.macro - name: (_) @text.reference + name: (curly_group_text (_) @text.reference) number: (_) @text.reference) (citation @@ -95,25 +97,25 @@ keys: (curly_group_text_list) @text.reference) (glossary_entry_definition - command: _ @function.macro - name: (_) @text.reference) + command: _ @function.macro + name: (curly_group_text (_) @text.reference)) (glossary_entry_reference - command: _ @function.macro - name: (_) @text.reference) + command: _ @function.macro + name: (curly_group_text (_) @text.reference)) (acronym_definition - command: _ @function.macro - name: (_) @text.reference) + command: _ @function.macro + name: (curly_group_text (_) @text.reference)) (acronym_reference - command: _ @function.macro - name: (_) @text.reference) + command: _ @function.macro + name: (curly_group_text (_) @text.reference)) (color_definition - command: _ @function.macro - name: (_) @text.reference) + command: _ @function.macro + name: (curly_group_text (_) @text.reference)) (color_reference - command: _ @function.macro - name: (_) @text.reference) + command: _ @function.macro + name: (curly_group_text (_) @text.reference)) ;; Math [ |
