Skip to content

Commit

Permalink
add scala support using scala-cli (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
caenrique committed Jun 4, 2024
1 parent 613276a commit db69fde
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/code_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```
5 changes: 5 additions & 0 deletions internal/code/languages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>"}},
},
}

0 comments on commit db69fde

Please sign in to comment.