nvim-treesitter/queries/bicep/locals.scm

69 lines
1.1 KiB
Scheme
Raw Normal View History

2023-02-23 04:42:37 -05:00
; Scopes
[
(infrastructure)
(call_expression)
(lambda_expression)
(subscript_expression)
(if_statement)
(for_statement)
(array)
(object)
(interpolation)
] @local.scope
2023-02-23 04:42:37 -05:00
; References
(property_identifier) @local.reference
2023-02-23 04:42:37 -05:00
(call_expression
(identifier) @local.reference)
2023-02-23 04:42:37 -05:00
(object_property
(_)
":"
(identifier) @local.reference)
2023-02-23 04:42:37 -05:00
(resource_expression
(identifier) @local.reference)
2023-02-23 04:42:37 -05:00
; Definitions
(type) @local.definition.associated
2023-02-23 04:42:37 -05:00
(object_property
(identifier) @local.definition.field
2023-02-23 04:42:37 -05:00
(_))
(object_property
(compatible_identifier) @local.definition.field
2023-02-23 04:42:37 -05:00
(_))
(import_name) @local.definition.import
2023-02-23 04:42:37 -05:00
(module_declaration
(identifier) @local.definition.namespace)
2023-02-23 04:42:37 -05:00
(parameter_declaration
(identifier) @local.definition.parameter
2023-02-23 04:42:37 -05:00
(_))
(type_declaration
(identifier) @local.definition.type
2023-02-23 04:42:37 -05:00
(_))
(variable_declaration
(identifier) @local.definition.var
2023-02-23 04:42:37 -05:00
(_))
(metadata_declaration
(identifier) @local.definition.var
2023-02-23 04:42:37 -05:00
(_))
(output_declaration
(identifier) @local.definition.var
2023-02-23 04:42:37 -05:00
(_))
(for_statement
"for"
(for_loop_parameters
(loop_variable) @local.definition.var
(loop_enumerator) @local.definition.var))