/sublime-schemas

Sublime Text related configuration file JSON schemas

Primary LanguageJavaScriptMIT LicenseMIT

Sublime Text configuration files JSON schemas

All JSON schemas based on Draft 07 Core meta-schema.

Write and validate Sublime Text related configuration files in editors that supports JSON Schema (JetBrains, Visual Studio Code).

This schemas can help configure Sublime Text project and settings for your fellow collegues that use Sublime Text editor and you work on that together.

Settings User Documentation Official Settings Documentation

Relates to conversion from Sublime Text settings to Visual Studio Code settings.

Usage

Visual Studio Code

Add to .vscode/settings.json:

{
    "json.schemas": [
        {
            "fileMatch": [
                "/**/*.sublime-settings"
            ],
            "url": "https://raw.githubusercontent.com/actuosus/sublime-schemas/master/src/schemas/json/sublime-settings.schema.json"
        }
    ]
}

Project User Documentation Official Project Documentation

Usage

Visual Studio Code

Add to .vscode/settings.json:

{
    "json.schemas": [
        {
            "fileMatch": [
                "/**/*.sublime-project"
            ],
            "url": "https://raw.githubusercontent.com/actuosus/sublime-schemas/master/src/schemas/json/sublime-project.schema.json"
        }
    ]
}

Official Workspace Documentation

Usage

Visual Studio Code

Add to .vscode/settings.json:

{
    "json.schemas": [
        {
            "fileMatch": [
                "/**/*.sublime-workspace"
            ],
            "url": "https://raw.githubusercontent.com/actuosus/sublime-schemas/master/src/schemas/json/sublime-workspace.schema.json"
        }
    ]
}

Build System JSON Schema Official Workspace Documentation

Usage

Visual Studio Code

Add to .vscode/settings.json:

{
    "json.schemas": [
        {
            "fileMatch": [
                "/**/*.sublime-build"
            ],
            "url": "https://raw.githubusercontent.com/actuosus/sublime-schemas/master/src/schemas/json/sublime-build.schema.json"
        }
    ]
}

Intermediate Schema Generation

JSON Schema can be generated based on any JSON file using dedicated script. Schemas is written to build folder and can be used as bootstap template for the final ones.

Install Node.js

https://nodejs.org/en/download/package-manager/

Generate

npm run generate-settings

To Do

  • prepare to contribute to JSON Schema Store
  • project configuration sync with VS Code (extension?)
  • project configuration sync with JetBrains (plugin?)
  • final schemas validatation and testing