Skip to content

Commit db69fde

Browse files
authored
add scala support using scala-cli (#298)
1 parent 613276a commit db69fde

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

examples/code_blocks.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,15 @@ void main() {
180180
```v
181181
println('Hello, world!')
182182
```
183+
184+
---
185+
186+
### Scala
187+
188+
```scala
189+
//> using dep com.lihaoyi::pprint:0.8.1
190+
191+
object Main extends App {
192+
println("Hello")
193+
}
194+
```

internal/code/languages.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const (
3434
Swift = "swift"
3535
Dart = "dart"
3636
V = "v"
37+
Scala = "scala"
3738
)
3839

3940
// Languages is a map of supported languages with their extensions and commands
@@ -119,4 +120,8 @@ var Languages = map[string]Language{
119120
Extension: "v",
120121
Commands: cmds{{"v", "run", "<file>"}},
121122
},
123+
Scala: {
124+
Extension: "sc",
125+
Commands: cmds{{"scala-cli", "run", "<file>"}},
126+
},
122127
}

0 commit comments

Comments
 (0)