feat(purescript): Configure when the module is shown (#2357)

This makes it possible to configure when the purescript 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-22 03:53:10 +09:00
committed by GitHub
parent efb82454f2
commit fe6f9eeb4d
3 changed files with 22 additions and 17 deletions
+11 -8
View File
@@ -2046,19 +2046,22 @@ format = "via [🔹 $version](147 bold) "
## PureScript
The `purescript` module shows the currently installed version of PureScript version.
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 `spago.dhall` file
- The current directory contains a \*.purs files
- The current directory contains a file with the `.purs` extension
### Options
| Option | Default | Description |
| ---------- | ------------------------------------ | ------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
| `style` | `"bold white"` | The style for the module. |
| `disabled` | `false` | Disables the `purescript` module. |
| Option | Default | Description |
| -------------------- | ------------------------------------ | ------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
| `detect_extensions` | `["purs"]` | Which extensions should trigger this moudle. |
| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `style` | `"bold white"` | The style for the module. |
| `disabled` | `false` | Disables the `purescript` module. |
### Variables