Aller au contenu principal

Projet

Traduction Bêta Non Officielle

Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →

Description

Affiche la version actuelle de votre projet définie dans le fichier de package.

Pris en charge :

  • Projet Node.js (package.json)

  • Projet Deno (deno.json, deno.jsonc)

  • Projet JSR (jsr.json, jsr.jsonc)

  • Projet Cargo (Cargo.toml)

  • Projet Python (pyproject.toml, prend en charge les métadonnées définies selon PEP 621 ou Poetry)

  • Projet Mojo (mojoproject.toml)

  • Projet PHP (composer.json)

  • Projet Dart (pubspec.yaml)

  • Projet basé sur nuspec (*.nuspec, les informations du premier fichier correspondant sont affichées)

  • Projet .NET (*.sln, *.slnf, *.slnx, *.csproj, *.vbproj ou *.fsproj, les informations du premier fichier correspondant sont affichées)

  • Projet Julia (JuliaProject.toml, Project.toml)

  • Projet PowerShell (*.psd1, les informations du premier fichier correspondant sont affichées)

Exemple de 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 }} "
}

Options

NameTypeDefaultDescription
always_enabledbooleanfalsealways show the segment
<type>_filesarray[]override the project's files to validate for. Use the .Type values listed below to override (e.g. dotnet_files)

Modèle (info)

modèle par défaut
 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }}

Propriétés

NameTypeDescription
.TypestringThe type of project:
  • node
  • deno
  • jsr
  • 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