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

Add back colons around inlay hints #11658

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Mar 8, 2022

Fixes #2797 (comment).

I originally thought that other extensions don't include the colons, but the TypeScript one seems to do.

@lnicola
Copy link
Member Author

lnicola commented Mar 8, 2022

image

@lnicola
Copy link
Member Author

lnicola commented Mar 8, 2022

CC @rami3l

@lnicola
Copy link
Member Author

lnicola commented Mar 8, 2022

I'm not sure whether it's fine to have this padding / formatting logic here. It feels wrong, but on the other hand it's nice to be easily able to check how these are set.

Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely in favor of getting these back, otherwise closures in arguments are very confusing with their labels 😬 image

@lnicola
Copy link
Member Author

lnicola commented Mar 8, 2022

bors r=Veykril

@HKalbasi
Copy link
Member

HKalbasi commented Mar 8, 2022

What is the reason of disabling paddings for TypeHints? Typescript has both left padding and :

image

@lnicola
Copy link
Member Author

lnicola commented Mar 8, 2022

I tried to match the aspect of hard-written code, i.e. let tactic: String. And on the right side, it looked pretty ugly:

image

(notice how it appears to have two spaces)

@bors
Copy link
Contributor

bors bot commented Mar 8, 2022

@bors bors bot merged commit 4924072 into rust-lang:master Mar 8, 2022
@lnicola lnicola deleted the inlay-hint-colons branch March 8, 2022 10:40
@jhgg
Copy link
Contributor

jhgg commented Mar 9, 2022

I wonder if we can discuss this matter with vscode proper. The new inlay hints are functionally better, but look pretty awful. If they removed this padding it would make both rust analyzer and TS language server look and feel much better.

@lnicola
Copy link
Member Author

lnicola commented Mar 9, 2022

@jhgg which padding? Some of it is actually controllable by the extension.

@lnicola lnicola mentioned this pull request Mar 9, 2022
@nilehmann
Copy link

oh no, I preferred the inlay hints without the colons :(

@jhgg
Copy link
Contributor

jhgg commented Mar 10, 2022

@jhgg which padding? Some of it is actually controllable by the extension.

image

See the awkward padding between the x and :?

So this is really only visible this way because I tried to make them look more faded compared to stock inlay hints:

image

I think it would be a good editor feature to simply hide the outer padding, basically, chop off:

image


It even overlaps the highlight >_>

image

@jhgg
Copy link
Contributor

jhgg commented Mar 16, 2022

BTW, opened a vscode issue regarding the padding here: microsoft/vscode#145191

@Sheepyhead Sheepyhead mentioned this pull request May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upstream inlay hints
5 participants