mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
70bbbd7d19
* rust: add highlight scope for type parameters * handle optional type parameters
32 lines
559 B
Scheme
32 lines
559 B
Scheme
; Scopes
|
|
|
|
[
|
|
(function_item)
|
|
(struct_item)
|
|
(enum_item)
|
|
(union_item)
|
|
(type_item)
|
|
(trait_item)
|
|
(impl_item)
|
|
(closure_expression)
|
|
(block)
|
|
] @local.scope
|
|
|
|
; Definitions
|
|
|
|
(parameter
|
|
(identifier) @local.definition)
|
|
|
|
(type_parameters
|
|
(type_identifier) @local.definition)
|
|
(constrained_type_parameter
|
|
left: (type_identifier) @local.definition)
|
|
(optional_type_parameter
|
|
name: (type_identifier) @local.definition)
|
|
|
|
(closure_parameters (identifier) @local.definition)
|
|
|
|
; References
|
|
(identifier) @local.reference
|
|
(type_identifier) @local.reference
|