Back to Gh Dash

Schema

docs/src/content/docs/configuration/schema.mdx

4.23.21.6 KB
Original Source

The dash configuration schema is published here:

https://gh-dash.dev/schema.json

Using the Schema in Neovim

  1. Install the yaml-language-server LSP

  2. Follow the guide in nvim-lspconfig to set it up

  3. Add the following line to the top of your configuration file:

    # yaml-language-server: $schema=https://gh-dash.dev/schema.json
    

With the directive comment at the top of your configuration or the VS Code settings file, you can then open your configurations and edit them with support for validation. When you hover on an option in your configuration file, you'll get a brief synopsis of the option and a link to its documentation on this site.

Using the Schema in VS Code

You can get edit-time feedback, validation, and IntelliSense for your configurations in VS Code by following these steps:

  1. Install Red Hat's YAML extension for VS Code.

  2. Open your dash configuration file.

  3. Add the following line to the top of your configuration file:

    # yaml-language-server: $schema=https://gh-dash.dev/schema.json
    
  4. Instead of adding a comment to your configuration file, you could create the .vscode/settings.json file in your dash configuration folder and add this setting:

    json
    {
      "yaml.schemas": {
        "https://gh-dash.dev/schema.json": "*.yml"
      }
    }