mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 20:30:05 -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
28
runtime/queries/v/locals.scm
Normal file
28
runtime/queries/v/locals.scm
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
((function_declaration
|
||||
name: (identifier) @definition.function)) ;@function
|
||||
|
||||
(var_declaration
|
||||
var_list: (expression_list
|
||||
(reference_expression
|
||||
(identifier) @definition.var)))
|
||||
|
||||
((function_declaration
|
||||
name: (identifier) @definition.function))
|
||||
|
||||
(const_declaration (const_definition name: (identifier) @definition.var))
|
||||
|
||||
(identifier) @reference
|
||||
|
||||
((call_expression name: (reference_expression (identifier)) @reference)
|
||||
(#set! reference.kind "call"))
|
||||
|
||||
((call_expression
|
||||
name: (selector_expression
|
||||
field: (reference_expression (identifier) @definition.function)))
|
||||
(#set! reference.kind "call"))
|
||||
|
||||
(source_file) @scope
|
||||
(function_declaration) @scope
|
||||
(if_expression) @scope
|
||||
(block) @scope
|
||||
(for_statement) @scope
|
||||
Loading…
Add table
Add a link
Reference in a new issue