Skip to main content

Node

Whatโ€‹

Display the currently active Node.js version.

Sample Configurationโ€‹

{
"type": "node",
"style": "powerline",
"powerline_symbol": "๎‚ฐ",
"foreground": "#ffffff",
"background": "#6CA35E",
"template": " ๎œ˜ {{ .Full }} "
}

Propertiesโ€‹

NameTypeDescription
home_enabledbooleandisplay the segment in the HOME folder or not - defaults to false
fetch_versionbooleandisplay the Node.js version - defaults to true
missing_command_textstringtext to display when the command is missing - defaults to empty
display_modestring
  • always: The segment is always displayed
  • files: The segment is only displayed when one of the following files is present (default):
    • *.js
    • *.ts
    • package.json
    • .nvmrc
    • pnpm-workspace.yaml
    • .pnpmfile.cjs
    • .npmrc
    • .vue
version_url_templatestringa go text/template template that creates the URL of the version info / release notes
fetch_package_managerbooleandefine if the current project uses Yarn or NPM - defaults to false
yarn_iconstringthe icon/text to display when using Yarn - defaults to \uF61A
npm_iconstringthe icon/text to display when using NPM - defaults to \uE71E

Template (info)โ€‹

default template
{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}

Propertiesโ€‹

NameTypeDescription
.Fullstringthe full version
.Majorstringmajor number
.Minorstringminor number
.Patchstringpatch number
.URLstringURL of the version info / release notes
.Errorstringerror encountered when fetching the version string
.PackageManagerIconstringthe Yarn or NPM icon when setting fetch_package_manager to true
.Mismatchbooleanif the version in .nvmrc matches with .Full
.Expectedstringthe expected version set in .nvmrc