From 34a8f7e62845fd66df3f6f9003cb850f2b0d9bc5 Mon Sep 17 00:00:00 2001 From: boreinhardt <59684097+boreinhardt@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:56:15 +0200 Subject: feat(gleam): Add Gleam module (#5886) Co-authored-by: benno.reinhardt --- docs/config/README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'docs/config/README.md') diff --git a/docs/config/README.md b/docs/config/README.md index 0c08d076d..f889ca8ff 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -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/). -- cgit v1.2.3