mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(scala): Add scala module (#2409)
* Add support for scala ( w/o sbt ) * Add scala description * Change scala color to bold red * update scala extensions in README * failed lint * cr changes ( regex, simplify parsing, imports ) * Scala readme punctuation Co-authored-by: David Knaack <davidkna@users.noreply.github.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
@@ -216,6 +216,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@@ -2272,6 +2273,49 @@ The module will be shown if any of the following conditions are met:
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala.
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------| ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -----------| ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
@@ -86,6 +86,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user