mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -04:00
fix(latex): some highlight query fixes (#2534)
* add \caption to @function * only highlight contents of curly text groups in references
This commit is contained in:
parent
32eb167875
commit
3c363ebd26
1 changed files with 21 additions and 19 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
||||||
(command_name) @function
|
(command_name) @function
|
||||||
|
(caption
|
||||||
|
command: _ @function)
|
||||||
|
|
||||||
(key_value_pair
|
(key_value_pair
|
||||||
key: (_) @parameter
|
key: (_) @parameter
|
||||||
|
|
@ -72,22 +74,22 @@
|
||||||
declaration: (_) @function)
|
declaration: (_) @function)
|
||||||
|
|
||||||
(theorem_definition
|
(theorem_definition
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (curly_group_text (_) @text.environment.name))
|
name: (curly_group_text (_) @text.environment.name))
|
||||||
|
|
||||||
(label_definition
|
(label_definition
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
(label_reference_range
|
(label_reference_range
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
from: (_) @text.reference
|
from: (curly_group_text (_) @text.reference)
|
||||||
to: (_) @text.reference)
|
to: (curly_group_text (_) @text.reference))
|
||||||
(label_reference
|
(label_reference
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
names: (_) @text.reference)
|
names: (curly_group_text_list (_) @text.reference))
|
||||||
(label_number
|
(label_number
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference
|
name: (curly_group_text (_) @text.reference)
|
||||||
number: (_) @text.reference)
|
number: (_) @text.reference)
|
||||||
|
|
||||||
(citation
|
(citation
|
||||||
|
|
@ -95,25 +97,25 @@
|
||||||
keys: (curly_group_text_list) @text.reference)
|
keys: (curly_group_text_list) @text.reference)
|
||||||
|
|
||||||
(glossary_entry_definition
|
(glossary_entry_definition
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
(glossary_entry_reference
|
(glossary_entry_reference
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
|
|
||||||
(acronym_definition
|
(acronym_definition
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
(acronym_reference
|
(acronym_reference
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
|
|
||||||
(color_definition
|
(color_definition
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
(color_reference
|
(color_reference
|
||||||
command: _ @function.macro
|
command: _ @function.macro
|
||||||
name: (_) @text.reference)
|
name: (curly_group_text (_) @text.reference))
|
||||||
|
|
||||||
;; Math
|
;; Math
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue