Add basic scoping queries
This commit is contained in:
parent
64ff9dd944
commit
073ff80adb
29
queries/locals.scm
Normal file
29
queries/locals.scm
Normal file
|
@ -0,0 +1,29 @@
|
|||
; Scopes {{{
|
||||
[
|
||||
(for_expression)
|
||||
(let_expression)
|
||||
(function_declaration)
|
||||
] @local.scope
|
||||
; }}}
|
||||
|
||||
; Definitions {{{
|
||||
(type_declaration
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(parameters
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(function_declaration
|
||||
name: (identifier) @local.definition)
|
||||
(primitive_declaration
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(variable_declaration
|
||||
name: (identifier) @local.definition)
|
||||
; }}}
|
||||
|
||||
; References {{{
|
||||
(identifier) @local.reference
|
||||
; }}}
|
||||
|
||||
; vim: sw=2 foldmethod=marker
|
Loading…
Reference in a new issue