-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Language Grammar Highlighting Messed Up? (Latest Insiders) #88997
Comments
Probably same root cause as #88911 |
Likely caused by semantic highlighting. Try setting |
Not a bug but semantic highlighting that shows the actual type of the import based on the theme |
@aeschli This is a major visual change that is going to cause a lot of issue reports against JS/TS. Are we shipping 1.42 with the semantic highlighting enabled by default? Anything we can do to reduce the impact? |
@aeschli it's understandable how it works, but it brings few problems to JSX:
class CompCls extends React.Component{}
function CompFun() {}
const CompArr = () => {}
//or
const CompRef = React.forwardRef(CompCls) IMHO In this case semantic meanings shouldn't rely on original types, but differentiate between (custom) components, regular tags, and attributes. This is not in place currently. So there is need to have extra info about cases when function/class/variable/property are used in |
We can turn it off by default for stable, but we should work through the various issues.
|
There is more than just imports affected here. @aeschli maybe i dont understand specifically but for example a Other times imports have 3 different colorings - gray, yellow, blue based on my theme. How many colors are there now? Is there info on what this is doing exactly? This seems to make the code really hard to read. I know i can turn it off, but i assume it is an ideal feature for other reasons and want to understand it before i just turn it off. A bit confused why and a I am guessing that it is trying to make functions one color and variables another, etc which is cool - I like that a lot. But seems inconsistent? Like this chain It very well could just be that my color theme isn't really setup well for the semantic highlighting ofc. needless to say can definitely see this causing a huge stir if it is default in a release people randomly get hit with. do love the idea of syntax highlighting being smart though - that would be awesome if it produced code that is equally or even more easy to read and grok! |
@bradennapier Thanks for the help to find all the issues.
Semantic highlighting only looks at identifiers and resolves them to find out to what symbol they resolve. Keywords are not touched. I tried to reproduce your example but I don't see any change for
|
Version: 1.42.0-insider
Commit: d72b2d3
Date: 2020-01-20T05:27:44.927Z
Electron: 7.1.7
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.3.0
Steps to Reproduce:
I believe this has broken languages for me. I am using "Babel Javascript" and noticed with the most recent update that my color themes are screwed up.
${}
strings #88075Recent Insiders Build:
Regular VSCode & Previous Insiders Builds:
Happen without Extensions?
Yes
The text was updated successfully, but these errors were encountered: