File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,9 @@ export const scalaTmLanguage: TmLanguage = {
168168 {
169169 include : '#keywords'
170170 } ,
171+ {
172+ include : '#using'
173+ } ,
171174 {
172175 include : '#constants'
173176 } ,
@@ -320,6 +323,18 @@ export const scalaTmLanguage: TmLanguage = {
320323 }
321324 ]
322325 } ,
326+ 'using' : {
327+ patterns : [
328+ {
329+ match : `\\(\\s*(using)` ,
330+ captures : {
331+ '1' : {
332+ name : 'keyword.declaration.scala'
333+ }
334+ }
335+ }
336+ ]
337+ } ,
323338 'string-interpolation' : {
324339 patterns : [
325340 {
Original file line number Diff line number Diff line change 1+ // SYNTAX TEST "source.scala"
2+
3+ def f (using x : Int ): Unit = ()
4+ // ^^^^^ keyword.declaration.scala
5+
6+ f(using 2 )
7+ // ^^^^^ keyword.declaration.scala
8+ // ^ constant.numeric.scala
9+
10+ class A (using x : Int )
11+ // ^^^^^ keyword.declaration.scala
12+
13+ new A (using 3 )
14+ // ^^^^^ keyword.declaration.scala
15+ // ^ constant.numeric.scala
16+
17+ given [T ](using x : Ord [T ], using : Int ) as Ord [List [T ]]
18+ // ^^^^^ keyword.declaration.scala
19+ // ^ variable.parameter.scala
20+ // ^^^^^ variable.parameter.scala
21+
22+ given [T ](using Ord [T ]) as Ord [List [T ]]
23+ // ^^^^^ keyword.declaration.scala
You can’t perform that action at this time.
0 commit comments