File tree Expand file tree Collapse file tree 7 files changed +52
-13
lines changed Expand file tree Collapse file tree 7 files changed +52
-13
lines changed Original file line number Diff line number Diff line change @@ -98,22 +98,22 @@ jobs:
98
98
DOTTY_DIR: dotty
99
99
run: script/smoke_test.sh
100
100
101
- - name: copy nvim-treesitter highlight queries
101
+ - name: copy nvim-treesitter queries
102
102
if: ${{ runner.os == 'Linux' }}
103
103
shell: bash
104
- run: cp ./nvim_treesitter/queries/scala/highlights .scm ./queries/scala/highlights.scm
104
+ run: cp ./nvim_treesitter/queries/scala/* .scm ./queries/
105
105
106
- - name: Check if highlight queries are out of sync with nvim-treesitter
106
+ - name: Check if queries are out of sync with nvim-treesitter
107
107
if: ${{ runner.os == 'Linux' }}
108
108
uses: tj-actions/verify-changed-files@v13
109
109
id: verify-changed-files
110
110
with:
111
111
files: |
112
- queries/scala/highlights .scm
112
+ queries/scala/* .scm
113
113
114
114
- name: Test quries if out of sync with nvim-treesitter
115
115
if: steps.verify-changed-files.outputs.files_changed == 'true'
116
116
run: |
117
- echo "::warning file=queries/scala/highlights.scm:: Queries in this repo are out of sync with nvim-treesitter"
118
- git diff queries/scala/highlights.scm
117
+ echo "::warning Queries in ${{ steps.verify-changed-files.outputs.changed_files }} in this repo are out of sync with nvim-treesitter"
118
+ git diff queries/scala/
119
119
npm run test
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json");
37
37
38
38
pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/scala/highlights.scm");
39
39
// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm");
40
- // pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm");
40
+ pub const LOCALS_QUERY: &'static str = include_str!("../../queries/scala /locals.scm");
41
41
// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm");
42
42
43
43
#[cfg(test)]
Original file line number Diff line number Diff line change 25
25
"file-types": [
26
26
"scala"
27
27
],
28
- "highlights": "queries/scala/highlights.scm"
28
+ "highlights": "queries/scala/highlights.scm",
29
+ "locals": "queries/scala/locals.scm"
29
30
}
30
31
]
31
32
}
Original file line number Diff line number Diff line change 23
23
(class_parameter
24
24
name: (identifier) @parameter)
25
25
26
- (interpolation) @none
26
+ (self_type (identifier) @parameter)
27
+
28
+ (interpolation (identifier) @none)
29
+ (interpolation (block) @none)
27
30
28
31
;; types
29
32
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ object Hello {
57
57
// ^ keyword
58
58
// ^ type
59
59
self: X =>
60
- // ^type
60
+ // ^parameter
61
61
// ^type
62
62
}
63
63
@@ -70,8 +70,14 @@ object Hello {
70
70
// ^keyword
71
71
// ^type.definition
72
72
73
- val hello = c"some $stuff "
73
+ val hello = c"some $mutation ${1} "
74
74
// ^function.call
75
75
// ^punctuation.special
76
+ // ^variable
77
+ // ^number
78
+ def meth = ???
79
+ // ^method
80
+ val hello2 = c"some $meth"
81
+ // ^method
76
82
}
77
83
Original file line number Diff line number Diff line change @@ -141,9 +141,9 @@ class Copier:
141
141
142
142
export scanUnit.scan
143
143
// ^ include
144
- // ^namespace
144
+ // ^variable
145
145
export printUnit.{status as _, *}
146
146
// ^ include
147
- // ^namespace
147
+ // ^variable
148
148
149
149
def status: List[String] = printUnit.status ++ scanUnit.status
You can’t perform that action at this time.
0 commit comments