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
- json
- yaml
- toml
{
"type": "dvc",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#193549",
"background": "#945dd6"
}
type: dvc
style: powerline
powerline_symbol:
foreground: "#193549"
background: "#945dd6"
type = "dvc"
style = "powerline"
powerline_symbol = ""
foreground = "#193549"
background = "#945dd6"
Options
| Name | Type | Default | Description |
|---|---|---|---|
native_fallback | boolean | false | when 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_formats | map[string]string | a 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
| Name | Type | Description |
|---|---|---|
.Status | DvcStatus | changes in the worktree (see below) |
DvcStatus
| Name | Type | Description |
|---|---|---|
.Added | int | number of new files |
.Modified | int | number of modified files |
.Deleted | int | number of deleted files |
.Missing | int | number of files not in cache |
.Changed | boolean | if the status contains changes or not |
.String | string | a string representation of the changes above |
Local changes use the following syntax:
| Icon | Description |
|---|---|
+ | added |
~ | modified |
- | deleted |
! | not in cache (missing) |