1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:30:07 +08:00
SpaceVim/bundle/nvim-treesitter/queries/hare/locals.scm

48 lines
781 B
Scheme

; Scopes
[
(module)
(function_declaration)
(if_statement)
(for_statement)
(match_expression)
(switch_expression)
] @scope
; References
[
(identifier)
(scoped_type_identifier)
] @reference
; Definitions
(global_binding
(identifier) @definition.constant . ":" (_))
(const_declaration
"const" (identifier) @definition.constant . "=")
(field
. (identifier) @definition.field)
(field_assignment
. (identifier) @definition.field)
(function_declaration
"fn" . (identifier) @definition.function)
(parameter
(_) @definition.parameter . ":")
(type_declaration
"type" (identifier) @definition.type . "=")
(type_declaration
"type" (identifier) @definition.enum . "=" (enum_type))
(let_declaration
"let" . (identifier) @definition.variable ","?)