diff --git a/examples/code_blocks.md b/examples/code_blocks.md index 79c47d2b..7bb2550f 100644 --- a/examples/code_blocks.md +++ b/examples/code_blocks.md @@ -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") +} +``` diff --git a/internal/code/languages.go b/internal/code/languages.go index 9e48dc82..ed6e5c97 100644 --- a/internal/code/languages.go +++ b/internal/code/languages.go @@ -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", ""}}, }, + Scala: { + Extension: "sc", + Commands: cmds{{"scala-cli", "run", ""}}, + }, }