mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(nim): Configure when the module is shown (#2347)
This makes it possible to configure when the nim module is shown based on the contents of a directory. This should make it possible to be a lot more granular when configuring the module.
This commit is contained in:
+10
-7
@@ -1708,7 +1708,7 @@ 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:
|
||||
By default 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
|
||||
@@ -1717,12 +1717,15 @@ The module will be shown if any of the following conditions are met:
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module |
|
||||
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nim` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module |
|
||||
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
|
||||
| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nim` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
||||
Reference in New Issue
Block a user