From 540c2c2475571f93a7ecaf813a7832f31cc6d8be Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 29 Apr 2021 23:22:20 +0200 Subject: 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 --- docs/config/README.md | 407 ++++++++++++++++++++++++---------------------- src/configs/cmake.rs | 2 + src/configs/crystal.rs | 2 + src/configs/dart.rs | 2 + src/configs/deno.rs | 2 + src/configs/dotnet.rs | 2 + src/configs/elixir.rs | 2 + src/configs/elm.rs | 2 + src/configs/erlang.rs | 2 + src/configs/go.rs | 2 + src/configs/helm.rs | 2 + src/configs/julia.rs | 2 + src/configs/kotlin.rs | 2 + src/configs/lua.rs | 2 + src/configs/nim.rs | 2 + src/configs/ocaml.rs | 6 +- src/configs/perl.rs | 6 +- src/configs/php.rs | 6 +- src/configs/purescript.rs | 2 + src/configs/scala.rs | 4 +- src/configs/swift.rs | 2 + src/configs/terraform.rs | 2 + src/configs/vagrant.rs | 2 + src/configs/zig.rs | 2 + src/formatter/version.rs | 14 ++ src/modules/cmake.rs | 28 +++- src/modules/crystal.rs | 33 ++-- src/modules/dart.rs | 35 ++-- src/modules/deno.rs | 42 +++-- src/modules/dotnet.rs | 42 ++--- src/modules/elixir.rs | 12 +- src/modules/elm.rs | 9 +- src/modules/erlang.rs | 13 +- src/modules/golang.rs | 18 +- src/modules/helm.rs | 54 +++--- src/modules/java.rs | 2 +- src/modules/julia.rs | 23 ++- src/modules/kotlin.rs | 39 +++-- src/modules/lua.rs | 17 +- src/modules/nim.rs | 8 +- src/modules/nodejs.rs | 2 +- src/modules/ocaml.rs | 8 +- src/modules/perl.rs | 8 +- src/modules/php.rs | 18 +- src/modules/purescript.rs | 8 +- src/modules/python.rs | 2 +- src/modules/ruby.rs | 2 +- src/modules/rust.rs | 2 +- src/modules/scala.rs | 14 +- src/modules/swift.rs | 17 +- src/modules/terraform.rs | 43 ++--- src/modules/vagrant.rs | 24 +-- src/modules/zig.rs | 11 +- 53 files changed, 601 insertions(+), 414 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index 056a39aa3..1613eaad9 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -466,15 +466,16 @@ the module will be activated if any of the following conditions are met: ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | -| `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | -| `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch`| +| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `detect_extensions` | `[]` | Which extensions should trigger this module | +| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | +| `detect_folders` | `[]` | Which folders should trigger this module | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -592,15 +593,16 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ------------------- | ------------------------------------ | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------ | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch`| +| `style` | `"bold red"` | The style for the module. | +| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | +| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -632,15 +634,16 @@ By default 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 Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch`| +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | +| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -669,15 +672,16 @@ By default 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 Deno | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | -| `disabled` | `false` | Disables the `deno` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"green bold"` | The style for the module. | +| `disabled` | `false` | Disables the `deno` module. | ### Variables @@ -839,16 +843,17 @@ when there is a csproj file in the current directory. ### Options -| Option | Default | Description | -| ------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. | -| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | -| `heuristic` | `true` | Use faster version detection to keep starship snappy. | -| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | 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 `dotnet` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. | +| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | 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 `dotnet` module. | ### Variables @@ -881,15 +886,16 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------- | --------------------------------------------------------------- | -| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["mix.exs"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold purple"` | The style for the module. | -| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. | -| `disabled` | `false` | Disables the `elixir` module. | +| Option | Default | Description | +| ------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `["mix.exs"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `elixir` module. | ### Variables @@ -924,15 +930,16 @@ By default 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 Elm. | -| `detect_extensions` | `["elm"]` | Which extensions should trigger this module. | -| `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["elm-stuff"]` | Which folders should trigger this modules. | -| `style` | `"cyan bold"` | The style for the module. | -| `disabled` | `false` | Disables the `elm` module. | +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `detect_extensions` | `["elm"]` | Which extensions should trigger this module. | +| `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | Which filenames should trigger this module. | +| `detect_folders` | `["elm-stuff"]` | Which folders should trigger this modules. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | ### Variables @@ -1001,15 +1008,16 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ------------------- | ------------------------------------ | -------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before displaying the version of erlang. | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["rebar.config", "elang.mk"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this modules. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `disabled` | `false` | Disables the `erlang` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `["rebar.config", "elang.mk"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `disabled` | `false` | Disables the `erlang` module. | ### Variables @@ -1309,15 +1317,16 @@ By default 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 Go. | -| `detect_extensions` | `["go"]` | Which extensions should trigger this module. | -| `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `["Godeps"]` | Which folders should trigger this module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `detect_extensions` | `["go"]` | Which extensions should trigger this module. | +| `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | Which filenames should trigger this module. | +| `detect_folders` | `["Godeps"]` | Which folders should trigger this module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | ### Variables @@ -1348,15 +1357,16 @@ By default 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. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this modules. | -| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `helm` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | ### Variables @@ -1507,15 +1517,16 @@ By default 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. | -| `detect_extensions` | `["jl"]` | Which extensions should trigger this module. | -| `detect_files` | `["Project.toml", "Manifest.toml"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this modules. | -| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | -| `style` | `"bold purple"` | The style for the module. | -| `disabled` | `false` | Disables the `julia` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `["jl"]` | Which extensions should trigger this module. | +| `detect_files` | `["Project.toml", "Manifest.toml"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | ### Variables @@ -1548,6 +1559,7 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["kt", "kts"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | @@ -1663,6 +1675,7 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | | `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | | `detect_files` | `[".lua-version"]` | Which filenames should trigger this module. | @@ -1787,15 +1800,16 @@ By default 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` | `"👑 "` | The symbol used before displaying the version of Nim. | -| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | -| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `nim` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | +| `detect_files` | `["nim.cfg"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | ### Variables @@ -1915,17 +1929,18 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | -| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | -| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | -| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `ocaml` module. | +| Option | Default | Description | +| ------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this module. | +| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | +| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables @@ -2052,15 +2067,16 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | -| `disabled` | `false` | Disables the `perl` module. | +| Option | Default | Description |**** +| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | +| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -2090,15 +2106,16 @@ By default 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` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | -| `disabled` | `false` | Disables the `php` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | +| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2129,15 +2146,16 @@ By default 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` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `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. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | +| `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 @@ -2379,15 +2397,16 @@ By default 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. | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | -| `disabled` | `false` | Disables the `scala` module. | +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | ### Variables @@ -2591,15 +2610,16 @@ 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 | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `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. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | +| `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 @@ -2638,15 +2658,16 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ------------------- | ------------------------------------ | ----------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `symbol` | `"💠"` | A format string shown before the Terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | -| `disabled` | `false` | Disables the `terraform` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"💠"` | A format string shown before the terraform workspace. | +| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -2785,15 +2806,16 @@ By default 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 Vagrant. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | -| `disabled` | `false` | Disables the `vagrant` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `vagrant` module. | ### Variables @@ -2856,15 +2878,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option