mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(scala): add in local variables queries
This syncs the queries that were updated in https://github.com/tree-sitter/tree-sitter-scala/pull/196. Co-authored-by: ghostbuster91 <ghostbuster91@users.noreply.github.com>
This commit is contained in:
parent
e559b6fb3f
commit
25dd24ed0e
1 changed files with 38 additions and 0 deletions
38
queries/scala/locals.scm
Normal file
38
queries/scala/locals.scm
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
; Scopes
|
||||
|
||||
[
|
||||
(template_body)
|
||||
(lambda_expression)
|
||||
(function_declaration)
|
||||
] @scope
|
||||
|
||||
; References
|
||||
|
||||
(identifier) @reference
|
||||
|
||||
; Definitions
|
||||
|
||||
(function_declaration
|
||||
name: (identifier) @definition.function)
|
||||
|
||||
(function_definition
|
||||
name: (identifier) @definition.function)
|
||||
|
||||
(parameter
|
||||
name: (identifier) @definition.parameter)
|
||||
|
||||
(binding
|
||||
name: (identifier) @definition.var)
|
||||
|
||||
(val_definition
|
||||
pattern: (identifier) @definition.var)
|
||||
|
||||
(var_definition
|
||||
pattern: (identifier) @definition.var)
|
||||
|
||||
(val_declaration
|
||||
name: (identifier) @definition.var)
|
||||
|
||||
(var_declaration
|
||||
name: (identifier) @definition.var)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue