Skip to content
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

Different colored backticks for template strings depending on presence of interpolation #369

Closed
switz opened this issue May 8, 2019 · 1 comment

Comments

@switz
Copy link

switz commented May 8, 2019

Screen Shot 2019-05-08 at 1 20 48 AM

I currently use single quotation marks for static strings (line 1), but I'm planning to switch to template strings (backticks, line 2 below) everywhere. It seems like backticks are colored red in Monokai, while single quotes are colored yellow.

This got me thinking about how it might be nice if static template strings' backticks were colored yellow similar to single quotes, but red if they have interpolated variables.

Now maybe some people would hate this, and it's quite likely it's not even necessarily possible to theme (I've never written a theme), but I actually think it would be kind of nice and somewhat match current functionality (I understand why one might take the opposing position).

And who knows, maybe it's bad practice to color the same characters differently.

Any insight is appreciated. Thanks for an awesome lib!

@Thom1729
Copy link
Contributor

I don't think that this would be desirable as the default behavior, because the scopes for string punctuation are standardized. In addition, determining whether a template string contains an interpolation could be problematic because the current version of Sublime doesn't lookahead across line boundaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants