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

[themes] improvements expressions in template string #13166

Closed
sheetalkamat opened this issue Oct 3, 2016 · 15 comments
Closed

[themes] improvements expressions in template string #13166

sheetalkamat opened this issue Oct 3, 2016 · 15 comments
Assignees
Labels
themes Color theme issues
Milestone

Comments

@sheetalkamat
Copy link
Member

  • VSCode Version:
  • OS Version:

Used latest vscode extension from https://marketplace.visualstudio.com/items?itemName=ms-vscode.typescript-javascript-grammar

This can also be found when using extension https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-atom-grammar

From @mhegazy at microsoft/TypeScript-TmLanguage#287
see number below
image

The expression is tokenized as meta.template.expression but theme doesn't use this information to colorize it correctly. Also note that number in the expression is scoped as variable.other.readwrite.

Probably ${ and } could be colored blue by using their scopes punctuation.definition.template-expression.begin and punctuation.definition.template-expression.end

@Tyriar
Copy link
Member

Tyriar commented Oct 3, 2016

Yes the scopes exist so this is indeed a theme issue:

image

@aeschli
Copy link
Contributor

aeschli commented Oct 17, 2016

I adopted the default themes to the grammar. It now looks like this:
image

@aeschli aeschli closed this as completed Oct 17, 2016
@aeschli aeschli added this to the October 2016 milestone Oct 17, 2016
@empz
Copy link

empz commented Oct 24, 2016

Would it be too hard to make ${ and } a different color or maybe bold or something?

@rob3c
Copy link

rob3c commented Oct 26, 2016

Yes, didn't ${ and } used to be separately colored? Matching them to either the string or the expression color is confusing and seems like a regression.

@aeschli
Copy link
Contributor

aeschli commented Nov 7, 2016

Reopening to fix the coloring of the interpolation ${...}

@aeschli aeschli closed this as completed in 5fb12f2 Nov 7, 2016
@aeschli aeschli changed the title Light/Dark Visual Studio theme needs improvements to handle expressions in template string [themes] improvements expressions in template string Nov 11, 2016
@gertcuykens
Copy link

gertcuykens commented Nov 12, 2016

Can you expand the template string coloring to include html syntax while you are at it? Let me know if I need to create a new feature request for this

Example:
image

PS Why did this picture blow up?

@aeschli
Copy link
Contributor

aeschli commented Nov 14, 2016

@gertcuykens Yes, please file a separate request. Please include the full code snippet that shows the issue. Please also for what language the code snippet is.

@gertcuykens
Copy link

I looked around a bit better and found many other tickets scattered around asking for it :) I think this is the main one #2000

@Tsmith18256
Copy link

Tsmith18256 commented Nov 23, 2016

This is not working for variables that use the all-caps constant naming convention.

screen shot 2016-11-23 at 10 27 58

Tested in the latest version (1.7.2).

@aeschli
Copy link
Contributor

aeschli commented Nov 23, 2016

@Tsmith18256 Please file a new issue? You can file directly against https://github.com/Microsoft/TypeScript-TmLanguage. Thanks a lot!

@empz
Copy link

empz commented Nov 23, 2016

I've filed a new issue: microsoft/TypeScript-TmLanguage#368

@empz
Copy link

empz commented Nov 24, 2016

@aeschli: @sheetalkamat says this is a vscode issue. Could you re-open this?
microsoft/TypeScript-TmLanguage#368 (comment)

@upkarlidder
Copy link

@aeschli possible to create a setting to allow auto closing the } bracket and place the cursor inside? Like the editor does for functions. This is not a bug. Just a question.

console.log(`this is ${this}`)

@aeschli
Copy link
Contributor

aeschli commented Jun 5, 2017

@lidderupk Inside strings we currently don't auto close brackets. Please file a new enhancement request with details against https://github.com/Microsoft/vscode/issues.

@upkarlidder
Copy link

@aeschli done. Thank you.
#28053

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
themes Color theme issues
Projects
None yet
Development

No branches or pull requests

8 participants