Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.52k stars 289 forks source link

Typescript Parameter Highlighting after Arrow Functions #303

Closed andy-bond closed 5 years ago

andy-bond commented 5 years ago

After using a "switch/case" statement, all functions defined after the switch/case will have improper highlighting of the parameter type. Example images below.

image

Notice the correct highlighting at the top (yellow color for the type). The functions defined below the switch/case have a red type.

I tested this by moving the functions below to above the function that contained the switch/case and they had their correct yellow highlighting when they were moved above. See below.

image

Binaryify commented 5 years ago

could you provide the code in your screenshots

andy-bond commented 5 years ago

After some better testing, the problem is not the switch/case as I originally thought, but the arrow-function declarations. I created a simpler example here:

https://gist.github.com/andybond006/49588071f4ded09fb3500d0bfe2de8d3

I made two comments indicating lines that, if they are commented out, will make everything appear in the correct color scheme in OneDark-Pro.

Binaryify commented 5 years ago

that might vscode's issues. arrow function change other keyword highlight scope

andy-bond commented 5 years ago

Fair enough. Just wanted it to be reported in any case. Thanks for looking into it and for the theme!

Binaryify commented 5 years ago

you are welcome👌🏻