How to add autocompletion for YAML configuration files in your editor#
You can use the pyCIF JSON schema to validate pyCIF’s YAML configuration files and add autocompletion to your text editor, provided it supports JSON Schema for YAML files.
The provided pyCIF JSON schema is available here: pycif_config.schema.json
Add autocompletion to Visual Studio Code (VS Code)#
The following instructions apply to VS Code and VS Codium.
Install the YAML extension:
Launch VS Code Quick Open (ctrl + P)
Paste the following command
ext install redhat.vscode-yamlPress enter
Add the pyCIF JSON schema URI to VS Code settings:
Open VS Code
settings.jsonfileLaunch VS Code Command Palette (ctrl + shift + P)
Type
open user settingsPress enter
Add the following entries (adapt the patterns if necessary) to
settings.json"yaml.disableDefaultProperties": true, "yaml.schemas": { "http://community-inversion.eu/pycif_config.schema.json": [ "*.yaml", "*.yml" ] },
Save
settings.jsonReload VS Code