Skip to content

A schema definition following the JSON Schema specification. It describes the requirements and options for YAML objects for the configuration files of the text expander program Espanso (https://espanso.org).

Notifications You must be signed in to change notification settings

ajmarkow/espanso-schema-json

Repository files navigation

Espanso JSON Schemas

About

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.

Schemas

This repository includes 3 schemas. The links below are updated to the most recent version with each update:

Usage

  1. 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.
  2. 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 the Espanso_Matches_File_Schema.json file, located in the schemas folder on your system.
    • Ensure that both Espanso_Matches_File_Schema.json and Espanso_Match_Schema.json are downloaded and kept in the same directory.
    • Note that Espanso_Matches_File_Schema.json depends on Espanso_Match_Schema.json.
  3. 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.

  4. Integration: This schema is also utilized for validation in the total_rewrite_of_snippet_cli_gem project.

TODO ↓

  • Implement conditions on any remaining invalid form property combinations. By refactoring lines 105-154

Resources

License

About

A schema definition following the JSON Schema specification. It describes the requirements and options for YAML objects for the configuration files of the text expander program Espanso (https://espanso.org).

Topics

Resources

Stars

Watchers

Forks