website/docs/segments/system/project.mdx
Display the current version of your project defined in the package file.
Supports:
package.json)deno.json, deno.jsonc)jsr.json, jsr.jsonc)Cargo.toml)pyproject.toml, supports metadata defined according to PEP 621 or Poetry)mojoproject.toml)composer.json)pubspec.yaml)*.nuspec, first file match info is displayed)*.sln, *.slnf, *.slnx, *.csproj, *.vbproj or *.fsproj, first file match info is displayed)JuliaProject.toml, Project.toml)*.psd1, first file match info is displayed)import Config from "@site/src/components/Config.js";
<Config data={{ type: "project", style: "powerline", powerline_symbol: "\uE0B0", foreground: "#193549", background: "#ffeb3b", template: " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} ", }} />
| Name | Type | Default | Description |
|---|---|---|---|
always_enabled | boolean | false | always show the segment |
<type>_files | array | [] | override the project's files to validate for. Use the .Type values listed below to override (e.g. dotnet_files) |
:::note default template
{{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }}
:::
| Name | Type | Description |
|---|---|---|
.Type | string | The type of project:<ul><li>node</li><li>deno</li><li>jsr</li><li>cargo</li><li>python</li><li>mojo</li><li>php</li><li>dart</li><li>nuspec</li><li>dotnet</li><li>julia</li><li>powershell</li></ul> |
.Version | string | The version of your project |
.Target | string | The target framework/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 |