Skip to content
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

Hover sometimes shows nice colors and sometimes not #2081

Closed
bpasero opened this issue Jan 18, 2016 · 10 comments
Closed

Hover sometimes shows nice colors and sometimes not #2081

bpasero opened this issue Jan 18, 2016 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jan 18, 2016

When I hover over functions I often see a nice hover similar to what the editor would show in terms of tokens and colors. But often I get no colors. What is the rule when a hover does show nice colors and when not?

@aeschli any ideas, is this your area?

To reproduce: open workbench.ts and hover over "registry" in line 200 and then over "Registry" later in that line. Only the first gets colors.

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Jan 18, 2016
@aeschli aeschli assigned jrieken and unassigned aeschli Jan 18, 2016
@aeschli
Copy link
Contributor

aeschli commented Jan 18, 2016

I think @jrieken worked on the hovers

@jrieken jrieken assigned aeschli and unassigned jrieken Jan 18, 2016
@jrieken
Copy link
Member

jrieken commented Jan 18, 2016

We use the tokenisers for that

@aeschli
Copy link
Contributor

aeschli commented Jan 27, 2016

@jrieken For the given example, the hover has content:
Workbench.registerEmitters(): void

That's not a valid TypeScipt syntax, that's why 'void' and 'registerEmitters' aren't colorized.
I don't think the tokenizer can be blamed for that. Looks like a the hover needs to use a different snippet such as function registerEmitters(): void or class Workbench { registerEmitters(): void }
Also note that the TypeScript grammar is somewhat context sensitive, so you can just feed it some tokens and hope for a consistenly colored content.

@aeschli aeschli assigned jrieken and unassigned aeschli Jan 27, 2016
@jrieken jrieken assigned dbaeumer and unassigned jrieken Jan 27, 2016
@jrieken
Copy link
Member

jrieken commented Jan 27, 2016

I would totally blame the TypeScript grammar for this because it makes no sense to be context sensitive when tokenising. The 'fix' would be for TypeScript to not use this feature but have their source unhighlighted.

@jrieken
Copy link
Member

jrieken commented Jan 27, 2016

@dbaeumer In the hover provider basically don't mark something as code but just return plain text

@dbaeumer dbaeumer added this to the Feb 2016 milestone Jan 29, 2016
@dbaeumer
Copy link
Member

Actually I like having color in the hover. In Feb I will try to make a request to TS to better support this.

@bpasero
Copy link
Member Author

bpasero commented Jan 29, 2016

Thanks 👍

@dbaeumer
Copy link
Member

Was too busy this milestone. Moving to march.

@dbaeumer dbaeumer modified the milestones: March 2016, Feb 2016 Feb 19, 2016
@dbaeumer dbaeumer modified the milestones: April 2016, March 2016 Mar 16, 2016
@dbaeumer
Copy link
Member

Guess what :-)

@dbaeumer dbaeumer modified the milestones: May 2016, April 2016 Apr 20, 2016
@dbaeumer dbaeumer modified the milestones: June 2016, May 2016 May 20, 2016
@dbaeumer dbaeumer modified the milestones: Backlog, June 2016 Jun 29, 2016
@mjbvz mjbvz assigned mjbvz and unassigned dbaeumer Oct 12, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Oct 12, 2017

Please let me know if you are still seeing this for and js/ts code

@mjbvz mjbvz closed this as completed Oct 12, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants