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:
Christian Clason 2022-02-16 17:29:56 +01:00 committed by GitHub
parent 32eb167875
commit 3c363ebd26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
[ [