Skip to main content

Project

What

Display the current version of your project defined in the package file.

Supports:

  • Node.js project (package.json)
  • Cargo project (Cargo.toml)
  • Python project (pyproject.toml, supports metadata defined according to PEP 621 or Poetry)
  • Mojo project (mojoproject.toml)
  • PHP project (composer.json)
  • Dart project (pubspec.yaml)
  • Any nuspec based project (*.nuspec, first file match info is displayed)
  • .NET project (*.sln, *.slnf, *.csproj, *.vbproj or *.fsproj, first file match info is displayed)
  • Julia project (JuliaProject.toml, Project.toml)
  • PowerShell project (*.psd1, first file match info is displayed)

Sample Configuration

{
"type": "project",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#193549",
"background": "#ffeb3b",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }} {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} "
}

Properties

NameTypeDefaultDescription
always_enabledbooleanfalsealways show the segment

Template (info)

default template
 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }}

Properties

NameTypeDescription
.TypestringThe type of project:
  • node
  • cargo
  • python
  • mojo
  • php
  • dart
  • nuspec
  • dotnet
  • julia
  • powershell
.VersionstringThe version of your project
.TargetstringThe target framework/language version of your project
.NamestringThe name of your project
.ErrorstringThe error context when we can't fetch the project info