feat(elm): Configure when the module is shown (#2341)

This makes it possible to configure when the elm 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:
Thomas O'Donnell
2021-02-20 18:33:00 +01:00
committed by GitHub
parent 9313e90773
commit 71b6fc1777
3 changed files with 22 additions and 20 deletions
+10 -7
View File
@@ -864,7 +864,7 @@ symbol = "🔮 "
## Elm
The `elm` module shows the currently installed version of Elm.
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 `elm.json` file
- The current directory contains a `elm-package.json` file
@@ -874,12 +874,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` | `"🌳 "` | A format string representing the symbol of Elm. |
| `style` | `"cyan bold"` | The style for the module. |
| `disabled` | `false` | Disables the `elm` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------- | ----------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. |
| `detect_extensions` | `["elm"]` | Which extensions should trigger this module. |
| `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["elm-stuff"]` | Which folders should trigger this modules. |
| `style` | `"cyan bold"` | The style for the module. |
| `disabled` | `false` | Disables the `elm` module. |
### Variables