mirror of
https://github.com/starship/starship.git
synced 2024-12-01 20:54:42 +01:00
fix(buf): fix spacing & harmonize docs with actual configuration (#4450)
* fix(buf): add whitespace after version string * fix: update config schema * fix: config version and bison emoji * fix: update documentation format * fix: dprint * fix: config schema
This commit is contained in:
parent
84bbe3dd03
commit
3d452367bd
4
.github/config-schema.json
vendored
4
.github/config-schema.json
vendored
@ -73,7 +73,7 @@
|
|||||||
"disabled": false,
|
"disabled": false,
|
||||||
"format": "with [$symbol($version )]($style)",
|
"format": "with [$symbol($version )]($style)",
|
||||||
"style": "bold blue",
|
"style": "bold blue",
|
||||||
"symbol": "",
|
"symbol": "🦬 ",
|
||||||
"version_format": "v${raw}"
|
"version_format": "v${raw}"
|
||||||
},
|
},
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@ -1729,7 +1729,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"symbol": {
|
"symbol": {
|
||||||
"default": "",
|
"default": "🦬 ",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -499,8 +499,8 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
|||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ------------------- | ---------------------------------------------------------- | ----------------------------------------------------- |
|
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
|
||||||
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
|
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
|
||||||
| `version_format` | `"v${raw}"` | The version format. |
|
| `version_format` | `"v${raw}"` | The version format. |
|
||||||
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
|
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
|
||||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||||
@ -512,8 +512,8 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
|||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
| Variable | Example | Description |
|
| Variable | Example | Description |
|
||||||
| ------------- | -------- | ------------------------------------ |
|
| --------- | -------- | ------------------------------------ |
|
||||||
| `buf_version` | `v1.0.0` | The version of `buf` |
|
| `version` | `v1.0.0` | The version of `buf` |
|
||||||
| `symbol` | | Mirrors the value of option `symbol` |
|
| `symbol` | | Mirrors the value of option `symbol` |
|
||||||
| `style`* | | Mirrors the value of option `style` |
|
| `style`* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ impl<'a> Default for BufConfig<'a> {
|
|||||||
BufConfig {
|
BufConfig {
|
||||||
format: "with [$symbol($version )]($style)",
|
format: "with [$symbol($version )]($style)",
|
||||||
version_format: "v${raw}",
|
version_format: "v${raw}",
|
||||||
symbol: "",
|
symbol: "🦬 ",
|
||||||
style: "bold blue",
|
style: "bold blue",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
detect_extensions: vec![],
|
detect_extensions: vec![],
|
||||||
|
@ -103,7 +103,7 @@ mod tests {
|
|||||||
.sync_all()
|
.sync_all()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let actual = ModuleRenderer::new("buf").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("buf").path(dir.path()).collect();
|
||||||
let expected = Some(format!("with {}", Color::Blue.bold().paint(" v1.0.0")));
|
let expected = Some(format!("with {}", Color::Blue.bold().paint("🦬 v1.0.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close().unwrap();
|
dir.close().unwrap();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user