feat(lua): Configure when the module is shown (#2326)

This makes it possible to configure when the lua 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:
Shu Kutsuzawa
2021-02-18 03:03:09 +09:00
committed by GitHub
parent 97fbfffd7e
commit 5e93160456
3 changed files with 23 additions and 18 deletions
+11 -8
View File
@@ -1569,7 +1569,7 @@ disabled = true
## Lua
The `lua` module shows the currently installed version of Lua.
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 `.lua-version` file
- The current directory contains a `lua` directory
@@ -1577,13 +1577,16 @@ 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` | `"🌙 "` | A format string representing the symbol of Lua. |
| `style` | `"bold blue"` | The style for the module. |
| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. |
| `disabled` | `false` | Disables the `lua` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. |
| `detect_extensions` | `["lua"]` | Which extensions should trigger this moudle. |
| `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["lua"]` | Which folders should trigger this module. |
| `style` | `"bold blue"` | The style for the module. |
| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. |
| `disabled` | `false` | Disables the `lua` module. |
### Variables