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) - PHP project (
composer.json
) - 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โ
- json
- yaml
- toml
{
"type": "project",
"style": "powerline",
"powerline_symbol": "๎ฐ",
"foreground": "#193549",
"background": "#ffeb3b",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}๏ {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} "
}
type: project
style: powerline
powerline_symbol: ๎ฐ
foreground: "#193549"
background: "#ffeb3b"
template: " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}๏
{{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} "
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โ
Name | Type | Default | Description |
---|---|---|---|
always_enabled | boolean | false | always show the segment |
Template (info)โ
default template
{{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }}
Propertiesโ
Name | Type | Description |
---|---|---|
.Type | string | The type of project:
|
.Version | string | The version of your project |
.Target | string | The target framwork/language version of your project |
.Name | string | The name of your project |
.Error | string | The error context when we can't fetch the project info |