mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
65
runtime/queries/hare/locals.scm
Normal file
65
runtime/queries/hare/locals.scm
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
; Scopes
|
||||
[
|
||||
(module)
|
||||
(function_declaration)
|
||||
(if_statement)
|
||||
(for_statement)
|
||||
(match_expression)
|
||||
(switch_expression)
|
||||
] @local.scope
|
||||
|
||||
; References
|
||||
[
|
||||
(identifier)
|
||||
(scoped_type_identifier)
|
||||
] @local.reference
|
||||
|
||||
; Definitions
|
||||
(global_binding
|
||||
(identifier) @local.definition.constant
|
||||
.
|
||||
":"
|
||||
(_))
|
||||
|
||||
(const_declaration
|
||||
"const"
|
||||
(identifier) @local.definition.constant
|
||||
.
|
||||
"=")
|
||||
|
||||
(field
|
||||
.
|
||||
(identifier) @local.definition.field)
|
||||
|
||||
(field_assignment
|
||||
.
|
||||
(identifier) @local.definition.field)
|
||||
|
||||
(function_declaration
|
||||
"fn"
|
||||
.
|
||||
(identifier) @local.definition.function)
|
||||
|
||||
(parameter
|
||||
(_) @local.definition.parameter
|
||||
.
|
||||
":")
|
||||
|
||||
(type_declaration
|
||||
"type"
|
||||
(identifier) @local.definition.type
|
||||
.
|
||||
"=")
|
||||
|
||||
(type_declaration
|
||||
"type"
|
||||
(identifier) @local.definition.enum
|
||||
.
|
||||
"="
|
||||
(enum_type))
|
||||
|
||||
(let_declaration
|
||||
"let"
|
||||
.
|
||||
(identifier) @local.definition.var
|
||||
","?)
|
||||
Loading…
Add table
Add a link
Reference in a new issue