mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(nim): Add Nim module (#1189)
* Nim module and tests * Add nim to docs * parse_nim_version refactor, add nim desc * Add nim symbol to Nerd Font preset * Yellow with v prefix as default version * Nim version fmt fix * Update docs/config/README.md Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Update src/modules/nim.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Nim module and tests * Add nim to docs * Yellow with v prefix as default version * Update docs/config/README.md Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Update src/modules/nim.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Add nim to docs, proper version formatting. * Remove v from symbol, add to fmt string * cargo fmt Co-authored-by: Dario Vladovic <d.vladimyr@gmail.com>
This commit is contained in:
@@ -115,6 +115,7 @@ prompt_order = [
|
||||
"haskell",
|
||||
"java",
|
||||
"julia",
|
||||
"nim",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
@@ -1016,6 +1017,33 @@ truncation_length = 4
|
||||
truncation_symbol = ""
|
||||
```
|
||||
|
||||
## Nim
|
||||
|
||||
The `nim` module shows the currently installed version of Nim.
|
||||
The module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `nim.cfg` file
|
||||
- The current directory contains a file with the `.nim` extension
|
||||
- The current directory contains a file with the `.nims` extension
|
||||
- The current directory contains a file with the `.nimble` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ------------------------------------------------------ |
|
||||
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nim` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[nim]
|
||||
style = "yellow"
|
||||
symbol = "🎣 "
|
||||
```
|
||||
|
||||
## Nix-shell
|
||||
|
||||
The `nix_shell` module shows the nix-shell environment.
|
||||
|
||||
@@ -58,6 +58,9 @@ symbol = " "
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
|
||||
Reference in New Issue
Block a user