mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(mojo): add module for Mojo language (#6108)
* feat: add support to mojo lang * docs: fix mojo formatting * Update src/modules/mojo.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * feat(mojo): parse hash as an independent variable * chore(mojo): fix formatting * chore(mojo): update schema and docs * feat(mojo): use lazy cmd evaluation --------- Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
@@ -2948,6 +2948,41 @@ truncation_length = 4
|
||||
truncation_symbol = ''
|
||||
```
|
||||
|
||||
## Mojo
|
||||
|
||||
The `mojo` module shows the current version of [Mojo programming language](https://www.modular.com/mojo) installed
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------- | ------------------------------------------------------ |
|
||||
| `format` | `'with [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `symbol` | `'🔥 '` | The symbol used before displaying the version of Mojo. |
|
||||
| `style` | `'bold 208'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `mojo` module. |
|
||||
| `detect_extensions` | `['mojo', '🔥']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `24.4.0` | The version of `mojo` |
|
||||
| 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
|
||||
|
||||
[mojo]
|
||||
format = 'via [mojo ($version )($hash )]($style)'
|
||||
```
|
||||
|
||||
## NATS
|
||||
|
||||
The `nats` module shows the name of the current [NATS](https://nats.io) context.
|
||||
|
||||
Reference in New Issue
Block a user