Skip to content

Instantly share code, notes, and snippets.

@bluesheeptoken
Created October 26, 2023 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluesheeptoken/b92cecd26da8cb3bf23f22de9175e85f to your computer and use it in GitHub Desktop.
Save bluesheeptoken/b92cecd26da8cb3bf23f22de9175e85f to your computer and use it in GitHub Desktop.
sublime-text build for Scala-cli

To create this new build-system,

  • go to Tools > Build System > New Build System...
  • copy paste build definition below
  • Either install the package ANSIescape to see ansi colors, or remove the target and syntax key
  • Enjoy
{
"cmd": ["scala-cli", "--scala-version", "2.13.12", "--jvm", "17", "$file"],
"syntax": "Package/Scala/sublime-syntax",
"selector": "source.scala",
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage",
"variants": [
{
"name": "format",
"cmd": ["scala-cli", "fmt", "$file"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment