-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Partial loss of Syntax highlighting when updating to Visual Studio 2017 RC #14422
Comments
is this only for a single project? are all files showing the same behavior? if so where is the second screenshot from? what happens if you open a new .ts file in a new session of VS? |
Multiple projects, thousands of files, all display the exact same behavior. I restarted VS multiple times (also, as I said, in VS2015 the syntax highlighting works flawlessly), and, among other things, tried:
This is how it looks in a larger scope: As you can see, it's "mostly" intact, but it seems as if the keyword recognition was leaking between tokens. Also, I believe that's not how methods are supposed to look. |
Interestingly enough, the same happens with plain |
Alright. Visual Studio 2017 RC is recognizing I believe something's not quite right in the TS language service. This is how it looks when applying a custom styling to Operator (picked a strong red one for it to be clearly visible): The
|
I have the very same problem. I started with VS2015 Professional this morning (TS 2.2) and installed VS2017 Professional RTM (TS 2.1) and the syntax highlighting is broken in exactly the same way as @JohnWeisz describes. |
For example, I clone https://github.com/tragetaschen/angular-issue-n14513 and choose from the context menu of the |
Looks like someone fundamentally broke the Typescript IClassifier! Below is an example where the public keyword changes its colouring depending on on the code: Notice how the second public keyword is not coloured blue. If i remove the contents of the first array, then the second public keyword becomes correctly coloured: This would also explain why the keywords are being incorrectly classified as Operators in the example that @JohnWeisz posted. |
Hmmmm.... trying the snippet from @Xcalllibur and the repro from @Tragetaschen , I don't see any problems. Screen clippings below. I even messed around with the default theme to see if this might have an impact, but all looked good. That said, there's definitely something up here. This has been reported in #14523 also. Can you take a look at the questions I just posted there and see if anything here might apply to your environments? Thanks, and sorry for the inconvenience. |
@Xcalllibur, @JohnWeisz : Thanks for helping us with this issue! TypeScript & JavaScript now use TextMate language files to inform classification. Some additional things to try that might help isolate the problem here:
Does the TypeScript reg key exist? The directory should match the tmLanguage folder path from question 2 – is it the same? Note: you'll need to unload the hive (File > Unload Hive) before you can open VS again. |
@billti @jramsay I can confirm that the fix provided by Peter-Juhasz in the thread you linked solved my issue, namely:
I then had to close all my files and reopen them to get the syntax highlighting to work (that is after restarting Visual Studio). Interestingly, before updating these files I tried deleting what was in my %userprofile% typescript folder and the syntax highlighting was still broken. I think it is relevant to mention that i also had Visual Studio 2015 installed on this machine with the latest Web Essentials extension installed. @jramsay I ran through your questions (1- 7) before trying this fix and none of them helped unfortunately. I don't have time to post detailed answers but i can confirm there was nothing out of the ordinary with my registry settings, etc. |
|
I just repeated the entire process:
|
I just released version 2.6 of the Syntax Highlighting Pack with a fix. The fix was to remove both the JavaScript and the TypeScript Textmate bundles. |
I can confirm that. Thanks @madskristensen! |
I had to remove the syntax highlighting pack 2.7 in order to get code coloring back in my ts files |
TypeScript Version: 2.1.5
Code
Expected behavior:
Keywords
import
,as
,from
,export
,var
andnew
should be highlighted (by default, blue).Actual behavior:
Only
var
is highlighted, as shown on this screenshot:Additional notes
The text was updated successfully, but these errors were encountered: