feat(kotlin): Configure when the module is shown (#2359)

This makes it possible to configure when the kotlin module is shown
based on the contents of a directory.
This commit is contained in:
Thomas O'Donnell
2021-02-21 19:56:48 +01:00
committed by GitHub
parent fe6f9eeb4d
commit 1a6c625521
3 changed files with 23 additions and 14 deletions
+11 -8
View File
@@ -1472,19 +1472,22 @@ symbol = "∴ "
## Kotlin
The `kotlin` module shows the currently installed version of Kotlin.
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 `.kt` or a `.kts` file
### Options
| Option | Default | Description |
| --------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. |
| `style` | `"bold blue"` | The style for the module. |
| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. |
| `disabled` | `false` | Disables the `kotlin` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `detect_extensions` | `["kt", "kts"]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. |
| `style` | `"bold blue"` | The style for the module. |
| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. |
| `disabled` | `false` | Disables the `kotlin` module. |
### Variables