language-javascript-jsx icon indicating copy to clipboard operation
language-javascript-jsx copied to clipboard

[Enhancement] Add styling for template strings

Open elbeezi opened this issue 10 years ago • 5 comments

e.g.

const bar = 42;
const baz = `foo ${bar}`; // 'foo 42'

foo should be styled as string and ${bar} should be styled as variable.

http://babeljs.io/docs/learn-es2015/#template-strings

elbeezi avatar Sep 16 '15 15:09 elbeezi

P.S. I've never done Atom dev, but if I get a chance I'll dig into the source and see about contributing PR(s).

elbeezi avatar Sep 16 '15 15:09 elbeezi

That should work already

subtleGradient avatar Sep 19 '15 21:09 subtleGradient

Sorry to dredge up an old report, but template strings are not working for me. With language-javascript-jsx installed if I do a Log Scopes At Cursor (Cmd+Alt+P) I see:

source.js.jsx meta.block.es meta.static meta.function.body variable.other.readwrite.js

If I disable language-javascript-jsx I see: source.js string.quoted.template.js

Running Atom 1.11.2 with language-javascript-jsx 0.3.7

PitmanPete avatar Oct 20 '16 11:10 PitmanPete

Thanks very much for taking the time to write this up.

Hmm. I could've sworn I had that working already. I do have some local changes that I haven't published, so there's a chance I've fixed this already.

I'm not going to have the time to look into this soon. Your best bet may be too switch to language-babel. I think that one is being better maintained these days.

I'm personally still using TextMate mostly. But I'm also spending a lot of time using IntelliJ these days. I'm hoping to fully switch to Atom eventually. Nuclide adds all kinds of fantastic features.

Sorry for not maintaining this stuff as much as I should. On Thu, Oct 20, 2016 at 7:37 AM PitmanPete [email protected] wrote:

Sorry to dredge up an old report, but template strings are not working for me. With language-javascript-jsx installed if I do a Log Scopes At Cursor (Cmd+Alt+P) I see:

source.js.jsx meta.block.es meta.static meta.function.body variable.other.readwrite.js

If I disable language-javascript-jsx I see: source.js string.quoted.template.js

Running Atom 1.11.2 with language-javascript-jsx 0.3.7

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/subtleGradient/language-javascript-jsx/issues/13#issuecomment-255081821, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAQFai7rNkZQmcHGuH1h6CP4NgcNHifks5q11KDgaJpZM4F-enq .

subtleGradient avatar Oct 20 '16 11:10 subtleGradient

np, thanks for replying so quick. language-babel looks like a good shout - thanks again!

PitmanPete avatar Oct 20 '16 14:10 PitmanPete