feat(gleam): Add Gleam module (#5886)

Co-authored-by: benno.reinhardt <benno.reinhardt@silbury.com>
This commit is contained in:
boreinhardt
2024-04-05 23:56:15 +02:00
committed by GitHub
parent f9c4bef85d
commit 34a8f7e628
12 changed files with 289 additions and 0 deletions
+40
View File
@@ -295,6 +295,7 @@ $elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
@@ -2058,6 +2059,45 @@ Use Windows Starship executable on Windows paths in WSL
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
```
## Gleam
The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/).
By default the module will be shown if any of the following conditions are met:
- The current directory contains a `gleam.toml` file
- The current directory contains a file with the `.gleam` extension
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'⭐ '` | A format string representing the symbol of Go. |
| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. |
| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. |
| `style` | `'bold #FFAFF3'` | The style for the module. |
| `disabled` | `false` | Disables the `gleam` module. |
### Variables
| Variable | Example | Description |
| -------- | -------- | ------------------------------------ |
| version | `v1.0.0` | The version of `gleam` |
| 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
[gleam]
format = 'via [⭐ $version](bold red) '
```
## Go
The `golang` module shows the currently installed version of [Go](https://golang.org/).
@@ -40,6 +40,9 @@ format = '(via [$symbol($version )]($style))'
[fennel]
format = '(via [$symbol($version )]($style))'
[gleam]
format = '(via [$symbol($version )]($style))'
[golang]
format = '(via [$symbol($version )]($style))'
@@ -37,6 +37,9 @@ format = 'via [$symbol]($style)'
[fennel]
format = 'via [$symbol]($style)'
[gleam]
format = 'via [$symbol]($style)'
[golang]
format = 'via [$symbol]($style)'
@@ -73,6 +73,9 @@ symbol = "gcp "
[git_branch]
symbol = "git "
[gleam]
symbol = "gleam "
[golang]
symbol = "go "