-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML grammar files #3079
YAML grammar files #3079
Conversation
Sublime Text YAML syntax definitions use the .sublime-syntax file extension Most syntax files declare a YAML 1.2 syntax although they are YAML 1.1 compatible Thus, the YAML version header is stripped off before parsing Displays a warning if parsing fails In .sublime-syntax files, the scope is under the 'scope' key -- as opposed to the usual 'scopeName' key
@@ -42,7 +42,7 @@ class DirectoryPackage | |||
case File.extname(path.downcase) | |||
when '.plist' | |||
path.split('/')[-2] == 'Syntaxes' | |||
when '.tmlanguage' | |||
when '.tmlanguage', '.yaml-tmlanguage', '.sublime-syntax' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sublime Text YAML syntax definitions use the .YAML-tmLanguage
file extension, and more recently, .sublime-syntax
.
/ cc @aroben incase he has a chance to give this a quick look. |
GitHub uses the JSON files this script creates rather than parsing the original files directly. So if this script can turn YAML into JSON then it should work fine on GitHub. |
This seems reasonable to me 👍 |
@arfon Do you want to wait for a specific version to merge this or should I go ahead? |
Nah, let's get this merged in. |
This pull request partially fixes the issue at #3070.
The scopes for
vendor/grammars/NSIS
andvendor/grammars/awk-sublime
were not recognized because the Sublime Text XML files were recently removed. The authors only kept the YAML files from which the XML files are generated.Thus, this pull request adds support for YAML syntax definitions in
script/convert-grammars
.A few new scopes were detected via
.YAML-tmLanguage
files. I added them ingrammars.yml
.