These are JSON Schema Specification compliant Schemas, which describe the requirements and options for YAML configuration and match files for the program Espanso. Based upon the documentation at https://espanso.org.
This repository includes 3 schemas. The links below are updated to the most recent version with each update:
- Espanso_Matches_File_Schema.json ← A schema for a match file, either the base file, or an application specific file.
- Espanso_Match_Schema.json ← A schema for individual matches within a match file.
- Espanso_Config_File_Schema.json ← A schema for espanso configuration files, either the base file, or application specific configurations.
-
Prerequisites:
- Before using this schema to validate your Espanso .yml files in VS Code, make sure you have the YAML extension installed in VS Code.
- You can find the extension here.
- Clone the schemas folder to your computer.
-
Configuration: To enable validation, add the following line to any Espanso match files where you want validation:
# yaml-language-server: $schema=(PATH)
- Replace
(PATH)
with the actual path to theEspanso_Matches_File_Schema.json
file, located in the schemas folder on your system. - Ensure that both
Espanso_Matches_File_Schema.json
andEspanso_Match_Schema.json
are downloaded and kept in the same directory. - Note that
Espanso_Matches_File_Schema.json
depends onEspanso_Match_Schema.json
.
- Replace
-
Validation and Completion: After configuration, any errors will be displayed in the problems pane of VS Code. You can also take advantage of IntelliSense completions while manually editing your configuration files, like
base.yml
. -
Integration: This schema is also utilized for validation in the total_rewrite_of_snippet_cli_gem project.
- Implement conditions on any remaining invalid form property combinations. By refactoring lines 105-154
- Good tool to check schema/json doc for compliance with spec: https://www.jeremydorn.com/json-editor
- Tools for working with YAML & JSON from JSON Formatter.
- Build a react UI from a JSON Schema using react-jsonschema-form.
- This software is licensed under the GNU GENERAL PUBLIC LICENSE V3.