Sure.
- Install the YAML plugin in VS Code through Marketplace (Contributor is Red Hat)
- For automatic scheme, go to
settings - plugins - YAMLand open thesettings.jsonfor Yaml:Schemas.
Please be aware that there are a bunch of different options to load settings, i.e. user, folder, workspace and much more I can’t remember
It depends on how you use VS Code which is the right place to configure, so chose wisely. - set the
yaml.schemasto look like this:
"yaml.schemas": {
"https://www.schemastore.org/openhab-5.1.json": [
"file:///etc/openhab/yaml/**/*.yml",
"file:///etc/openhab/yaml/**/*.yaml"
]
}
- If your
$OPENHAB_CONFis pointing to another folder than/etc/openhab/, please change the path accordingly. - Check whether json format is still valid (missing comma, etc.)
Try it out by creating a test.yml file in $OPENHAB_CONF/yaml/ or a subfolder of this path.