mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 17:00:09 -04:00
fix(leo): update queries (#7086)
* small bugfixes of variables, records, and struct highlighting * lockfile.json update * fixed @constant bug, and added self.address, and network.id as builtins to highlight * fixed associated function calls
This commit is contained in:
parent
2eb50352c0
commit
5071ca777c
2 changed files with 25 additions and 12 deletions
|
|
@ -1,7 +1,3 @@
|
|||
(variable_identifier) @variable
|
||||
|
||||
(constant_identifier) @constant
|
||||
|
||||
[
|
||||
"assert"
|
||||
"assert_eq"
|
||||
|
|
@ -31,6 +27,8 @@
|
|||
|
||||
"self" @variable.builtin
|
||||
|
||||
"network" @variable.builtin
|
||||
|
||||
"async" @keyword.coroutine
|
||||
|
||||
[
|
||||
|
|
@ -115,7 +113,15 @@
|
|||
(boolean_literal) @boolean
|
||||
|
||||
(constant_declaration
|
||||
(identifier) @constant)
|
||||
(identifier
|
||||
(constant_identifier) @constant))
|
||||
|
||||
(variable
|
||||
(constant_identifier) @constant)
|
||||
|
||||
(associated_constant) @constant
|
||||
|
||||
(variable) @variable
|
||||
|
||||
[
|
||||
(program_id)
|
||||
|
|
@ -124,7 +130,7 @@
|
|||
|
||||
;record declaration
|
||||
(record_declaration
|
||||
(identifier) @variable.member)
|
||||
(identifier) @type.definition)
|
||||
|
||||
;struct component
|
||||
(struct_component_declaration
|
||||
|
|
@ -132,18 +138,26 @@
|
|||
|
||||
(type) @type
|
||||
|
||||
(associated_constant) @constant
|
||||
|
||||
[
|
||||
(block_height)
|
||||
(self_address)
|
||||
(self_caller)
|
||||
(self_signer)
|
||||
(network_id)
|
||||
] @constant.builtin
|
||||
|
||||
(free_function_call
|
||||
(locator
|
||||
(identifier) @function))
|
||||
|
||||
(associated_function_call
|
||||
(named_type
|
||||
(identifier
|
||||
(constant_identifier) @function)))
|
||||
|
||||
(associated_function_call
|
||||
(identifier) @function.call)
|
||||
|
||||
(record_type
|
||||
(locator
|
||||
(identifier) @variable.member))
|
||||
|
|
@ -173,11 +187,10 @@
|
|||
(identifier) @variable.parameter)
|
||||
|
||||
(struct_declaration
|
||||
name: (identifier) @variable.member)
|
||||
name: (identifier) @type.definition)
|
||||
|
||||
(variable_declaration
|
||||
(identifier_or_identifiers
|
||||
(identifier) @variable))
|
||||
(identifier) @variable)
|
||||
|
||||
[
|
||||
(address_literal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue