feat(swift): Configure when the module is shown (#2349)

This makes it possible to configure when the swift module is shown
based on the contents of a directory.
This commit is contained in:
David Knaack
2021-02-21 18:01:31 +01:00
committed by GitHub
parent a499f30157
commit 509767adc0
3 changed files with 22 additions and 15 deletions
+10 -7
View File
@@ -2412,7 +2412,7 @@ disabled = false
## Swift
The `swift` module shows the currently installed version of Swift.
By default the `swift` module shows the currently installed version of Swift.
The module will be shown if any of the following conditions are met:
- The current directory contains a `Package.swift` file
@@ -2420,12 +2420,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 Swift |
| `style` | `"bold 202"` | The style for the module. |
| `disabled` | `false` | Disables the `swift` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
| `detect_extensions` | `["swift"]` | Which extensions should trigger this moudle. |
| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `style` | `"bold 202"` | The style for the module. |
| `disabled` | `false` | Disables the `swift` module. |
### Variables