When files or directories are added to the project, or stages to a pipeline, DVC metafiles are created. These use a simple YAML format.
We maintain a schema for
dvc.yaml
that can enable IDE syntax checks and auto-completion.
To make dvc.lock
and .dvc
files recognized as YAML, add the following in
settings.json
:
"files.associations": {
"*.dvc": "yaml",
"dvc.lock": "yaml"
}
Enable enhanced
IntelliSense, on
dvc.yaml
files by installing the
YAML extension.
These IDEs should ask how to associate file types for dvc.lock
and .dvc
files when you first open one of them. If not, follow
this guide
to set them manually.
PyCharm should provide auto-completion and syntax checks for dvc.yaml
files
out of the box. If not, refer to
these instructions.
In order to recognize dvc.lock
and .dvc
files as YAML in Vim, you should
add:
" DVC
autocmd! BufNewFile,BufRead Dvcfile,*.dvc,dvc.lock setfiletype yaml
to your ~/.vimrc
(to be created if it doesn't exist).