with one click
syntax-definition
// Create or update a Sublime Text 3 compatible `.sublime-syntax` grammar in the repository `syntaxes/` directory when asked for a specific language or format such as JSON, TypeScript, Elm, or Dockerfile.
// Create or update a Sublime Text 3 compatible `.sublime-syntax` grammar in the repository `syntaxes/` directory when asked for a specific language or format such as JSON, TypeScript, Elm, or Dockerfile.
| name | syntax-definition |
| description | Create or update a Sublime Text 3 compatible `.sublime-syntax` grammar in the repository `syntaxes/` directory when asked for a specific language or format such as JSON, TypeScript, Elm, or Dockerfile. |
Use this skill when asked to create or update a syntax definition for a named language or file format.
Create or update exactly one grammar file in the repository top-level syntaxes/ directory:
syntaxes/<Language>.sublime-syntaxAlso create or update one fixture/expectations pair under tests/fixtures/syntaxes/<language>/:
<sample>.<ext><sample>.<ext>.tokens.ymlExamples:
JSON -> syntaxes/JSON.sublime-syntaxTypeScript -> syntaxes/TypeScript.sublime-syntaxElm -> syntaxes/Elm.sublime-syntaxDockerfile -> syntaxes/Dockerfile.sublime-syntaxIf a matching file already exists, update it instead of creating a duplicate.
.sublime-syntax structure.syntaxes/ directory unless the user explicitly asks for something else.tests/fixtures/syntaxes/.When compatibility is uncertain, prefer conservative syntax features:
%YAML 1.2namefile_extensionsscopevariablescontextsmatchcapturesscopepushsetpopincludemeta_scopemeta_content_scopesyntaxes/ to match the repository's existing style and naming conventions.tests/fixtures/syntaxes/<language>/.<sample>.<ext>.tokens.yml with:
buffer_path: the virtual filename used to select the syntaxexpectations: an ordered list of critical (text, scope) checkscargo test syntaxes to test and fix issues with the generated/updated syntax.source.<language> or text.<format> as appropriate.scribe::Workspace.current_buffer_tokens() test harness.