diff --git a/.github/config-schema.json b/.github/config-schema.json index 68cdb957..f92051a5 100644 --- a/.github/config-schema.json +++ b/.github/config-schema.json @@ -71,9 +71,9 @@ ], "detect_folders": [], "disabled": false, - "format": "with [$symbol ($version)]($style)", + "format": "with [$symbol($version )]($style)", "style": "bold blue", - "symbol": "", + "symbol": "🦬 ", "version_format": "v${raw}" }, "allOf": [ @@ -1721,7 +1721,7 @@ "type": "object", "properties": { "format": { - "default": "with [$symbol ($version)]($style)", + "default": "with [$symbol($version )]($style)", "type": "string" }, "version_format": { @@ -1729,7 +1729,7 @@ "type": "string" }, "symbol": { - "default": "", + "default": "🦬 ", "type": "string" }, "style": { diff --git a/docs/config/README.md b/docs/config/README.md index e3a30778..2f58ee35 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -498,24 +498,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil ### Options -| Option | Default | Description | -| ------------------- | ---------------------------------------------------------- | ----------------------------------------------------- | -| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. | -| `version_format` | `"v${raw}"` | The version format. | -| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `elixir` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------- | ----------------------------------------------------- | +| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. | +| `version_format` | `"v${raw}"` | The version format. | +| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `elixir` module. | ### Variables -| Variable | Example | Description | -| ------------- | -------- | ------------------------------------ | -| `buf_version` | `v1.0.0` | The version of `buf` | -| `symbol` | | Mirrors the value of option `symbol` | -| `style`* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| `version` | `v1.0.0` | The version of `buf` | +| `symbol` | | Mirrors the value of option `symbol` | +| `style`* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string diff --git a/src/configs/buf.rs b/src/configs/buf.rs index 60e6f761..f59e70d2 100644 --- a/src/configs/buf.rs +++ b/src/configs/buf.rs @@ -21,9 +21,9 @@ pub struct BufConfig<'a> { impl<'a> Default for BufConfig<'a> { fn default() -> Self { BufConfig { - format: "with [$symbol ($version)]($style)", + format: "with [$symbol($version )]($style)", version_format: "v${raw}", - symbol: "", + symbol: "🦬 ", style: "bold blue", disabled: false, detect_extensions: vec![], diff --git a/src/modules/buf.rs b/src/modules/buf.rs index 177aa46d..4d54063b 100644 --- a/src/modules/buf.rs +++ b/src/modules/buf.rs @@ -103,7 +103,7 @@ mod tests { .sync_all() .unwrap(); 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); dir.close().unwrap(); }