forked from Gakai/sublime_toml_highlighting
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Syntax update #7
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No changes to the syntax, yet. This includes a syntax test.
constant.other.boolean -> constant.language
- Support _ separator. - Assign keyword.operator.arithmetic to +- prefix. - Reject 0. and accept +0 and -0.
This adds support for all the other datetime variants.
- Give escapes specific constant.character.escape scope, and reject invalid escapes. - Give the begin/end quotes separate scopes punctuation.definition.string.begin/end - Change scope of "double quoted strings" from string.quoted.*single* to string.quoted.*double*.
These are grouped together because the data-types context was changed to pop off the stack once a successful match was made to make it more robust. - Key/value changes: - Key scope changed to "entity.name.tag" from "keyword.key". - Equals scope changed to "punctuation.definition.key-value" from "punctuation.definition.keyValuePair". - Keys now use the "string" contexts to better handle strings (such as escape highlighting). - Don't aggressively red-highlight while typing a key. - Array changes: - Give the open/close brackets separate punctuation.definition.array.begin/end scopes. - Give , separator the punctuation.separator.array scope. - Better rejection of invalid arrays. - Inline-table changes: - Give the open/close brackets separate punctuation.definition.inline-table.begin/end scopes. - Give , separator the punctuation.separator.inline-table scope. - Better rejection of invalid inline tables.
- Remove meta.tag.table (it was scoping the entire file). - Change name scope to "entity.name.table" from "entity.other.attribute-name.table". - Support comments after the table name. - Give opening/closing brackets separate punctuation.definition.table.begin/end scopes. - Supported quoted names in tables. - Support spaces separating parts of table name.
Closed
Would be great to get this merged in! Looks like there are a lot of valuable improvements made here |
This was referenced Jun 4, 2018
Works as expect for me! Thanks! |
Big thanks to you, @ehuss! Now the syntax is actually usable 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Broad overview of changes:
sublime-syntax
format.This fixes #6 and #5.
Detailed changes:
Boolean: Change scope
constant.other.boolean
toconstant.language
.Integer/Float:
_
separator.keyword.operator.arithmetic
to+-
prefix.0.
and accept+0
and-0
.Datetime: Support all variants.
Strings:
constant.character.escape
scope, and reject invalid escapes.punctuation.definition.string.begin/end
string.quoted.*single*
tostring.quoted.*double*
.Key/value:
entity.name.tag
fromkeyword.key
.punctuation.definition.key-value
frompunctuation.definition.keyValuePair
.Array:
punctuation.definition.array.begin/end
scopes.,
separator thepunctuation.separator.array
scope.Inline-table:
punctuation.definition.inline-table.begin/end
scopes.,
separator thepunctuation.separator.inline-table
scope.Table names:
meta.tag.table
(it was scoping the entire file).entity.name.table
fromentity.other.attribute-name.table
.punctuation.definition.table.begin/end
scopes.