add scala support using scala-cli (#298)

This commit is contained in:
César Enrique Ramírez
2024-06-04 16:04:10 +02:00
committed by GitHub
parent 613276a80f
commit db69fde19b
2 changed files with 17 additions and 0 deletions

View File

@@ -180,3 +180,15 @@ void main() {
```v
println('Hello, world!')
```
---
### Scala
```scala
//> using dep com.lihaoyi::pprint:0.8.1
object Main extends App {
println("Hello")
}
```

View File

@@ -34,6 +34,7 @@ const (
Swift = "swift"
Dart = "dart"
V = "v"
Scala = "scala"
)
// Languages is a map of supported languages with their extensions and commands
@@ -119,4 +120,8 @@ var Languages = map[string]Language{
Extension: "v",
Commands: cmds{{"v", "run", "<file>"}},
},
Scala: {
Extension: "sc",
Commands: cmds{{"scala-cli", "run", "<file>"}},
},
}