Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Modify upstream grammar to support optimistic syntax. Resolves #251. - #279

Merged
rebornix merged 2 commits into
masterfrom
make_grammar_optimistic_again
Mar 4, 2018
Merged

rebornix merged 2 commits into
masterfrom
make_grammar_optimistic_again

Conversation

@wingrunr21

@wingrunr21 wingrunr21 commented Mar 3, 2018 •

Copy link
Copy Markdown
Collaborator

The original syntax highlighting was based on an "optimistic" syntax highlighting grammar. This change allows us to continue to use the upstream Atom grammar but will insert the correct grammar scopes to still support the optimistic highlighting.

See here for information on what these scopes mean and why.

Note that I could not discover a way to support constant.other.symbol and constant.language.symbol at the same time. This means Ruby symbols will be highlighted the same as core language constants (like nil). In reality this is probably ok as most themes with explicit support appear to map the same color to both types.

Before:
syntax_highlighting_before

After:
syntax_highlighting_after

The original syntax highlighting was based on an "optimistic" syntax highlighting grammar. This change allows us to continue to use the upstream Atom grammar but will insert the correct grammar scopes to still support the optimistic highlighting
@wingrunr21
wingrunr21 force-pushed the make_grammar_optimistic_again branch from c645211 to 15b9624 Compare March 3, 2018 12:12
@rebornix
rebornix merged commit 0bafcaa into master Mar 4, 2018
@roflomglol

Copy link
Copy Markdown

Hello,

After march update I've noticed odd highlighting and found out in the changelog that there were changes regarding this. So the question is, in this particular example, is method call .three['a'] highlighted as expected?

image

Thanks

@wingrunr21

Copy link
Copy Markdown
Collaborator Author

@roflomglol would you mind moving this to a new issue? I can follow up there

@roflomglol

roflomglol commented Mar 6, 2018 •

Copy link
Copy Markdown

@wingrunr21 Yeah, sure. Sorry, thats probably not a good place to discuss it. :) Here is the issue

@wingrunr21
wingrunr21 deleted the make_grammar_optimistic_again branch April 21, 2018 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants