Skip to content

String templates not colorized in VS 2013 #1698

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

Closed
mhegazy opened this issue Jan 16, 2015 · 7 comments
Closed

String templates not colorized in VS 2013 #1698

mhegazy opened this issue Jan 16, 2015 · 7 comments
Assignees
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created Fixed A PR has been merged for this issue Visual Studio Integration with Visual Studio

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Jan 16, 2015

String templates should be colorizes like string literals.

@mhegazy mhegazy added Bug A bug in TypeScript Visual Studio Integration with Visual Studio labels Jan 16, 2015
@mhegazy mhegazy added this to the TypeScript 1.5 milestone Jan 16, 2015
@DanielRosenwasser DanielRosenwasser added By Design Deprecated - use "Working as Intended" or "Design Limitation" instead Duplicate An existing issue was already created labels Jan 16, 2015
@DanielRosenwasser
Copy link
Member

Duplicate of #1477, see my comment for an explanation of the technical difficulties associated with this: #1477 (comment) .

Though, we could enhance the lexical classifier, but I don't know if it's really worth it.

@DanielRosenwasser DanielRosenwasser added Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Won't Fix The severity and priority of this issue do not warrant the time or complexity needed to fix it Too Complex An issue which adding support for may be too complex for the value it adds and removed By Design Deprecated - use "Working as Intended" or "Design Limitation" instead Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Jan 16, 2015
@DanielRosenwasser DanielRosenwasser removed this from the TypeScript 1.5 milestone Jan 18, 2015
@DanielRosenwasser DanielRosenwasser removed their assignment Jan 18, 2015
@NoelAbrahams
Copy link

@DanielRosenwasser, colour would really help

image

The template string version is more difficult to comprehend.

@DanielRosenwasser
Copy link
Member

@NoelAbrahams I understand that. This is probably a lousy experience for most people, and as the one who implemented templates, I personally felt like I owed our users something a little better. This afternoon I whipped something up.

I have a branch from which you can build the source code and swap out your language service in VS2013. The specific commit (e42ce9c) can be cherry picked onto the release-1.4 branch.

Basically, as long as your template strings' substitutions don't contain:

  • Expressions with closing curly braces on a separate line
  • Other substitution template strings that span multiple lines

this should fit your needs.

If it doesn't, well, you probably have other problems to worry about. 😉

@NoelAbrahams
Copy link

@DanielRosenwasser, will try that out. Do you mean to say that in VS 2015 this should be coloured correctly? (A bug in NTVS is preventing us from using VS 2015 atm, but we should be migrating soon.)

Thanks!

@DanielRosenwasser
Copy link
Member

You're very welcome! Let me know how this works out for you. Yes, 2015 should already work with template colorization.

That's unfortunate - does the Node Tools team know about the bug?

@NoelAbrahams
Copy link

Yes, there's a discussion item.

@DanielRosenwasser DanielRosenwasser added Fixed A PR has been merged for this issue and removed Won't Fix The severity and priority of this issue do not warrant the time or complexity needed to fix it labels Feb 13, 2015
@DanielRosenwasser DanielRosenwasser self-assigned this Feb 13, 2015
@DanielRosenwasser
Copy link
Member

A fix is now in master through #2026.

@DanielRosenwasser DanielRosenwasser removed the Too Complex An issue which adding support for may be too complex for the value it adds label Feb 13, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created Fixed A PR has been merged for this issue Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

3 participants