Skip to content

Commit dae948d

Browse files
zetashiftSchuyler Mortimer
authored andcommitted
chore: update scala tree-sitter grammar (helix-editor#7147)
* chore: update scala tree-sitter grammar * Add locals.scm for Scala
1 parent bc16a9c commit dae948d

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

languages.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ language-servers = [ "metals" ]
12291229

12301230
[[grammar]]
12311231
name = "scala"
1232-
source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "f6bbf35de41653b409ca9a3537a154f2b095ef64" }
1232+
source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "23d21310fe4ab4b3273e7a6810e781224a3e7fe1" }
12331233

12341234
[[language]]
12351235
name = "dockerfile"

runtime/queries/scala/locals.scm

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
(template_body) @local.scope
2+
(lambda_expression) @local.scope
3+
4+
5+
(function_declaration
6+
name: (identifier) @local.definition) @local.scope
7+
8+
(function_definition
9+
name: (identifier) @local.definition)
10+
11+
(parameter
12+
name: (identifier) @local.definition)
13+
14+
(binding
15+
name: (identifier) @local.definition)
16+
17+
(val_definition
18+
pattern: (identifier) @local.definition)
19+
20+
(var_definition
21+
pattern: (identifier) @local.definition)
22+
23+
(val_declaration
24+
name: (identifier) @local.definition)
25+
26+
(var_declaration
27+
name: (identifier) @local.definition)
28+
29+
(identifier) @local.reference

0 commit comments

Comments
 (0)