Skip to main content

DVC

What

Display DVC (Data Version Control) information when in a DVC repository.

The segment is displayed when the dvc executable is available and a .dvc directory is found in the current or any parent directory. The status is retrieved using dvc status --json.

Sample Configuration

{
"type": "dvc",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#193549",
"background": "#945dd6"
}

Options

NameTypeDefaultDescription
native_fallbackbooleanfalsewhen set to true and dvc.exe is not available when inside a WSL2 shared Windows drive, we will fallback to the native dvc executable to fetch data. Not all information can be displayed in this case
status_formatsmap[string]stringa key, value map allowing to override how individual status items are displayed. For example, "status_formats": { "Added": "Added: %d" } will display the added count as Added: 1 instead of +1. See the DvcStatus section for the keys

Template (info)

default template
\ue8d1 {{.Status.String}}

Properties

NameTypeDescription
.StatusDvcStatuschanges in the worktree (see below)

DvcStatus

NameTypeDescription
.Addedintnumber of new files
.Modifiedintnumber of modified files
.Deletedintnumber of deleted files
.Missingintnumber of files not in cache
.Changedbooleanif the status contains changes or not
.Stringstringa string representation of the changes above

Local changes use the following syntax:

IconDescription
+added
~modified
-deleted
!not in cache (missing)