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

VS Code wrap viewport width broken with type inlays #3333

Closed
slyngbaek opened this issue Feb 26, 2020 · 7 comments
Closed

VS Code wrap viewport width broken with type inlays #3333

slyngbaek opened this issue Feb 26, 2020 · 7 comments
Labels
A-inlay-hints inlay/inline hints A-vscode vscode plugin issues S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@slyngbaek
Copy link
Contributor

Probably low-pri, but I noticed that in VS Code the "wrap to viewport width" setting doesn't work when rust-analyzer provides inline typehints.

Wrap to viewport width setting:
image

No typehints, wrapping to viewport works correctly:
image

With typehints, wrapping is incorrect:
image

Potentially related to #3138

@slyngbaek slyngbaek changed the title vs code wrap viewport width VS Code wrap viewport width broken with type inlays Feb 26, 2020
@kjeremy
Copy link
Contributor

kjeremy commented Feb 26, 2020

I wonder if we had a really long (or multiple on one line?) code lense if they would wrap.

@Veetaha
Copy link
Contributor

Veetaha commented Feb 27, 2020

Inlay type hints do not contribute to the number of characters in a line which, I think, is used to compute word wrapping. I guess we should file an issue to vscode regarding CSS pseudo-elements width not being considered for word wrapping.

@lnicola
Copy link
Member

lnicola commented Feb 27, 2020

See also microsoft/vscode#16221.

@trevyn
Copy link

trevyn commented May 8, 2020

I think this is the underlying vscode issue, I added a comment about the rust-analyzer use case: microsoft/vscode#32856

(Also, they use thumbs-up count on the issue to prioritize, so you know what to do.)

@lnicola lnicola added A-vscode vscode plugin issues S-unactionable Issue requires feedback, design decisions or is blocked on other work labels Jan 22, 2021
@Keavon
Copy link

Keavon commented Oct 28, 2021

What's the status on this now that VS Code supports native inlay hints (that respect wrapping widths)?

@lnicola
Copy link
Member

lnicola commented Oct 28, 2021

No news yet: microsoft/language-server-protocol#956 (comment).

@Veykril Veykril added the A-inlay-hints inlay/inline hints label Dec 17, 2021
@Veykril
Copy link
Member

Veykril commented Mar 16, 2022

We switched to the native inlay hints which to my knowledge support this.

@Veykril Veykril closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inlay-hints inlay/inline hints A-vscode vscode plugin issues S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

7 participants