-
Notifications
You must be signed in to change notification settings - Fork 21
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
{{ $something }} highlighting broken inside HTML parameters #21
Comments
Autocomplete uses the same ctrl+alt+shift+p scope names at cursor, which means that currently it's not possible to achieve the desired effect without a grammar scope dedicated to the right side character from the cursor. This is because first-mate only outputs tokens for characters and does not allow for zero-width tokens. These tokens could be the solution for more accurate cursor scopes. It is also pretty much impossible to please everyone with the choice of scope names for those opening and closing tags. As discussed before in other issues/pull requests, I believe that semantic scope names are better, even if they look ugly with your favorite theme, because they encourage theme designers to do it right as well. I hope there is a better solution available or at least we should be aiming towards getting the underlying issues fixed, not apply temporary (read: permanent) hacks one after another without a plan to remove them later. Fixing it manually in CSS should do in the meanwhile, I can post the snippet if someone wants. |
@Ingramz Mind sharing that CSS snippet? |
Actually I came up with a better solution to the problem. Update to the latest version to see if it works for you. |
Interesting, I thought the issue was about the syntax highlighting almost entirely breaking down within HTML parameters, not just the closing brace. This is what I see: I'm using the Ax Monokai syntax theme. |
@Gawdl3y that's just a theme that doesn't handle this corner case properly. You can try placing into one of the parameters This issue is/was about the closing |
What is necessary to get the syntax theme working correctly for this? See alexbarton/atom-ax-monokai-syntax#1 |
@Gawdl3y depends what do you mean by "correctly". It could easily be that the author of the theme intended for it to look like this. It's not "broken", but rather "unstyled". |
Using "Atom Dark" theme:
![source_hack](https://cloud.githubusercontent.com/assets/1017132/7955528/aee499c4-09e1-11e5-9296-aaf274906282.png)
The reason why the first
}
is colored differently is because it's nearest class issource
, which is/was required to get autocomplete to detect scope in situations where the cursor is right before the ending brace. With recent improvements to autocomplete, it needs to investigated whether we need the hack anymore or should we go with PHP-s solution where a workaround has been applied (https://github.com/atom/atom-dark-syntax/blob/master/index.less#L179) - that would change the color of the curly braces.The text was updated successfully, but these errors were encountered: