-
Notifications
You must be signed in to change notification settings - Fork 599
Open
Labels
Description
The number of main keys in the sublime-syntax file format increases. While it seems common practise to have variables context before contexts the header keys are sorted alphabetically only.
I'd propose to group the name, scope and version keys as they describe the the syntax itself.
The file_extensions and first_line_match should follow and be separated by an empty line,
Here's an example of how it could look like:
%YAML 1.2
---
# https://www.sublimetext.com/docs/syntax.html
# https://www.mysyntax.com/specs/index.html
name: MySyntax
scope: source.mysyntax
version: 2
hidden: false
extends:
- souse.basesyntax
- souse.basesyntax2
file_extensions:
- main_ext
- ext2
hidden_file_extensions:
- any
- thing
first_line_match: |-
(?x:
^\#! .* \b(mysyntax)\b | # shebang
^/[/*] \s* -\*- .*? \bmysyntax\b \s* -\*-(?: \s* [/*]/)? # editorconfig
)
variables:
var1: ...
contexts:
main:
...michaelblyons, jfcherng and keith-hall