mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06:50:06 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
c13e28f894
commit
2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions
47
runtime/queries/hare/locals.scm
Normal file
47
runtime/queries/hare/locals.scm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
; 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 ","?)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue