Optional: Editor Integration for Prodvana Configs
Prodvana config schema is published to prodvana-public repo, under schemas/gen/ProdvanaConfig.json, in the JSON Schema format. With an appropriate editor integration, the schema can be used to lint configs live as edits happen.
Visual Studio Code
- Install
redhat.vscode-yaml
extension. - Add the following to settings.json:
"yaml.schemas": {
"https://raw.githubusercontent.com/prodvana/prodvana-public/main/schemas/gen/ProdvanaConfig.json": "*.pvn.yaml"
},
"yaml.format.bracketSpacing": false,
yaml.format.bracketSpacing
Setting this value to
false
prevents the autoformatter from messing with{{.var}}
style templating used in Prodvana configs.
NeoVim
- Install the yaml-language server locally.
- Configure the
yaml-language-server
with the following options:
require('lspconfig').yamlls.setup({
settings = {
yaml = {
schemas = {
["https://raw.githubusercontent.com/prodvana/prodvana-public/main/schemas/gen/ProdvanaConfig.json"] = "*.pvn.yaml"
},
format = {
braceSpacing = false
},
},
},
})
Updated about 1 year ago