mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-08-17 12:00:22 +03:00
chore: update scala tree-sitter grammar (#7147)
* chore: update scala tree-sitter grammar * Add locals.scm for Scala
This commit is contained in:
parent
a726799a4e
commit
92380540b8
@ -1229,7 +1229,7 @@ language-servers = [ "metals" ]
|
||||
|
||||
[[grammar]]
|
||||
name = "scala"
|
||||
source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "f6bbf35de41653b409ca9a3537a154f2b095ef64" }
|
||||
source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "23d21310fe4ab4b3273e7a6810e781224a3e7fe1" }
|
||||
|
||||
[[language]]
|
||||
name = "dockerfile"
|
||||
|
29
runtime/queries/scala/locals.scm
Normal file
29
runtime/queries/scala/locals.scm
Normal file
@ -0,0 +1,29 @@
|
||||
(template_body) @local.scope
|
||||
(lambda_expression) @local.scope
|
||||
|
||||
|
||||
(function_declaration
|
||||
name: (identifier) @local.definition) @local.scope
|
||||
|
||||
(function_definition
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(parameter
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(binding
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(val_definition
|
||||
pattern: (identifier) @local.definition)
|
||||
|
||||
(var_definition
|
||||
pattern: (identifier) @local.definition)
|
||||
|
||||
(val_declaration
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(var_declaration
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(identifier) @local.reference
|
Loading…
Reference in New Issue
Block a user