mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
feat: add bicep
This commit is contained in:
parent
061ee1b98f
commit
028b7dfbdd
8 changed files with 363 additions and 0 deletions
74
queries/bicep/locals.scm
Normal file
74
queries/bicep/locals.scm
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
; Scopes
|
||||
|
||||
[
|
||||
(infrastructure)
|
||||
(call_expression)
|
||||
|
||||
(lambda_expression)
|
||||
(subscript_expression)
|
||||
|
||||
(if_statement)
|
||||
(for_statement)
|
||||
|
||||
(array)
|
||||
(object)
|
||||
(interpolation)
|
||||
] @scope
|
||||
|
||||
; References
|
||||
|
||||
(property_identifier) @reference
|
||||
|
||||
(call_expression
|
||||
(identifier) @reference)
|
||||
|
||||
(object_property
|
||||
(_)
|
||||
":"
|
||||
(identifier) @reference)
|
||||
|
||||
(resource_expression
|
||||
(identifier) @reference)
|
||||
|
||||
; Definitions
|
||||
|
||||
(type) @definition.associated
|
||||
|
||||
(object_property
|
||||
(identifier) @definition.field
|
||||
(_))
|
||||
|
||||
(object_property
|
||||
(compatible_identifier) @definition.field
|
||||
(_))
|
||||
|
||||
(import_name) @definition.import
|
||||
|
||||
(module_declaration
|
||||
(identifier) @definition.namespace)
|
||||
|
||||
(parameter_declaration
|
||||
(identifier) @definition.parameter
|
||||
(_))
|
||||
|
||||
(type_declaration
|
||||
(identifier) @definition.type
|
||||
(_))
|
||||
|
||||
(variable_declaration
|
||||
(identifier) @definition.var
|
||||
(_))
|
||||
|
||||
(metadata_declaration
|
||||
(identifier) @definition.var
|
||||
(_))
|
||||
|
||||
(output_declaration
|
||||
(identifier) @definition.var
|
||||
(_))
|
||||
|
||||
(for_statement
|
||||
"for"
|
||||
(for_loop_parameters
|
||||
(loop_variable) @definition.var
|
||||
(loop_enumerator) @definition.var))
|
||||
Loading…
Add table
Add a link
Reference in a new issue