feat: Add version formating for modules (#2611)

* format crystal version with VersionFormatter

* update crystal dosc

* format crystal module

* fix typos

* format dart version with VersionFormatter

* fix dart malformed test

* update dart docs

* format cmake version with VersionFormatter

* update cmake docs

* format deno version with VersionFormatter

* update deno docs

* remove Version type

* format dotnet version with VersionFormatter

* update dotnet docs

* format erlang version with VersionFormatter

* update erlang docs

* format golang version with VersionFormatter

* refactor formatting in my modules

* format helm version with VersionFormatter

* format julia version with VersionFormatter

* format kotlin version with VersionFormatter

* format lua version with VersionFormatter

* format nim version with VersionFormatter

* format perl version with VersionFormatter

* format php version with VersionFormatter

* format purescript version with VersionFormatter

* format scala version with VersionFormatter

* format swift version with VersionFormatter

* format terraform version with VersionFormatter

* format vagrant version with VersionFormatter

* format zig version with VersionFormatter

* format elixir version with VersionFormatter

* format ocaml version with VersionFormatter

* update elixir docs

* update golang docs

* update helm docs

* update julia docs

* update kotlin docs

* update lua docs

* update nim docs

* update ocaml docs

* update perl docs

* update php docs

* update purescript docs

* update scala docs

* update swift docs

* update terraform docs

* update vagrant docs

* update zig docs

* format elm version with VersionFormatter

* update elm docs

* pass module_name as &str to format_module_version
This commit is contained in:
filip
2021-04-29 23:22:20 +02:00
committed by GitHub
parent c2e84e1802
commit 540c2c2475
53 changed files with 601 additions and 414 deletions
+4 -2
View File
@@ -5,9 +5,10 @@ use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
pub struct PhpConfig<'a> {
pub format: &'a str,
pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub format: &'a str,
pub disabled: bool,
pub detect_extensions: Vec<&'a str>,
pub detect_files: Vec<&'a str>,
@@ -17,9 +18,10 @@ pub struct PhpConfig<'a> {
impl<'a> Default for PhpConfig<'a> {
fn default() -> Self {
PhpConfig {
format: "via [$symbol($version )]($style)",
version_format: "v${raw}",
symbol: "🐘 ",
style: "147 bold",
format: "via [$symbol($version )]($style)",
disabled: false,
detect_extensions: vec!["php"],
detect_files: vec!["composer.json", ".php-version"],