mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Updated highlight queries for tlaplus
This commit is contained in:
parent
d49a11a8e8
commit
4917a31541
1 changed files with 49 additions and 31 deletions
|
|
@ -66,7 +66,7 @@
|
|||
(case_box)
|
||||
(case_arrow)
|
||||
(label_as)
|
||||
] @keyword
|
||||
] @number
|
||||
[
|
||||
(def_eq)
|
||||
(maps_to)
|
||||
|
|
@ -74,41 +74,25 @@
|
|||
] @keyword.function
|
||||
|
||||
; Literals
|
||||
(number) @number
|
||||
(nat_number) @number
|
||||
(real_number) @float
|
||||
(binary_number (format) @string.special)
|
||||
(octal_number (format) @string.special)
|
||||
(hex_number (format) @string.special)
|
||||
(binary_number (value) @number)
|
||||
(octal_number (value) @number)
|
||||
(hex_number (value) @number)
|
||||
(string) @string
|
||||
(escape_char) @string.escape
|
||||
(boolean) @boolean
|
||||
(primitive_value_set) @type
|
||||
|
||||
; Comments
|
||||
(comment) @comment
|
||||
(block_comment) @comment
|
||||
(unit (single_line) @comment)
|
||||
(single_line) @comment
|
||||
(extramodular_text) @text
|
||||
|
||||
; Namespaces
|
||||
(module name: (identifier) @namespace)
|
||||
(extends (identifier_ref) @namespace)
|
||||
(instance (identifier_ref) @namespace)
|
||||
(module_definition name: (identifier) @namespace)
|
||||
|
||||
; Constants, Variables, and Operators
|
||||
(variable_declaration (identifier) @variable)
|
||||
(constant_declaration (identifier) @constant)
|
||||
(operator_definition name: (_) @function.macro)
|
||||
(function_definition name: (identifier) @function)
|
||||
(bound_prefix_op symbol: (_) @operator)
|
||||
(bound_infix_op symbol: (_) @operator)
|
||||
(bound_postfix_op symbol: (_) @operator)
|
||||
|
||||
; Parameters
|
||||
(operator_definition parameter: (identifier) @parameter)
|
||||
(operator_definition (operator_declaration name: (_) @parameter))
|
||||
(module_definition parameter: (identifier) @parameter)
|
||||
(module_definition (operator_declaration name: (_) @parameter))
|
||||
(function_definition (quantifier_bound (identifier) @parameter))
|
||||
(function_definition (quantifier_bound (tuple_of_identifiers (identifier) @parameter)))
|
||||
(lambda (identifier) @parameter)
|
||||
|
||||
; Punctuation and Delimiters
|
||||
[
|
||||
(langle_bracket)
|
||||
|
|
@ -124,17 +108,51 @@
|
|||
] @punctuation.bracket
|
||||
[
|
||||
","
|
||||
"."
|
||||
":"
|
||||
"<"
|
||||
">"
|
||||
"!"
|
||||
] @punctuation.delimiter
|
||||
(bullet_conj) @punctuation.special
|
||||
(bullet_disj) @punctuation.special
|
||||
(prev_func_val) @punctuation.special
|
||||
(placeholder) @punctuation.special
|
||||
|
||||
; Namespaces
|
||||
(module name: (identifier) @namespace)
|
||||
(extends (identifier_ref) @namespace)
|
||||
(instance (identifier_ref) @namespace)
|
||||
(module_definition name: (identifier) @namespace)
|
||||
|
||||
; Constants, Variables, and Operators
|
||||
(variable_declaration (identifier) @variable)
|
||||
(constant_declaration (identifier) @constant)
|
||||
(constant_declaration (operator_declaration name: (_) @constant))
|
||||
(recursive_declaration (identifier) @function.macro)
|
||||
(recursive_declaration (operator_declaration name: (_) @function.macro))
|
||||
(operator_definition name: (_) @function.macro)
|
||||
(function_definition name: (identifier) @function)
|
||||
(bound_prefix_op symbol: (_) @operator)
|
||||
(bound_nonfix_op (prefix_op_symbol) @operator)
|
||||
(bound_infix_op symbol: (_) @operator)
|
||||
(bound_nonfix_op (infix_op_symbol) @operator)
|
||||
(bound_postfix_op symbol: (_) @operator)
|
||||
(bound_nonfix_op (postfix_op_symbol) @operator)
|
||||
|
||||
; Parameters
|
||||
(operator_definition parameter: (identifier) @parameter)
|
||||
(operator_definition (operator_declaration name: (_) @parameter))
|
||||
(module_definition parameter: (identifier) @parameter)
|
||||
(module_definition (operator_declaration name: (_) @parameter))
|
||||
(function_definition (quantifier_bound (identifier) @parameter))
|
||||
(function_definition (quantifier_bound (tuple_of_identifiers (identifier) @parameter)))
|
||||
(lambda (identifier) @parameter)
|
||||
|
||||
; Proofs
|
||||
(proof_step_id "<" @punctuation.bracket)
|
||||
(proof_step_id (level) @number)
|
||||
(proof_step_id (name) @symbol)
|
||||
(proof_step_id (name) @constant)
|
||||
(proof_step_id ">" @punctuation.bracket)
|
||||
(proof_step_ref "<" @punctuation.bracket)
|
||||
(proof_step_ref (level) @number)
|
||||
(proof_step_ref (name) @symbol)
|
||||
(proof_step_ref (name) @constant)
|
||||
(proof_step_ref ">" @punctuation.bracket)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue