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 inlay hints #48

Merged
merged 1 commit into from
Dec 29, 2024
Merged

Add inlay hints #48

merged 1 commit into from
Dec 29, 2024

Conversation

truelossless
Copy link
Contributor

@truelossless truelossless commented Dec 28, 2024

Add support for the highlight group LspInlayHint. This should fix #44.
I chose arbitrary colors but I think they're quite close to those in the Helix theme.

Before:
Screenshot from 2024-12-28 19-39-07

After:
Screenshot from 2024-12-28 19-38-11

After, Mirage :
Screenshot from 2024-12-28 19-44-54

@Shatur
Copy link
Owner

Shatur commented Dec 28, 2024

I think that inlay hints needs to be grayish. Here is how it looks in VSCode with the same theme with Mirage:
image

@truelossless
Copy link
Contributor Author

Alright, I used the comment color instead. Is it better or should I define/reuse another gray tone?

Screenshot from 2024-12-29 11-47-54
Screenshot from 2024-12-29 11-49-28

@Shatur
Copy link
Owner

Shatur commented Dec 29, 2024

It looks nicer, but it might worth to use a different color. Otherwise it blends with comments. Example from VSCode:
image

@truelossless
Copy link
Contributor Author

truelossless commented Dec 29, 2024

So, I went down a rabbit hole and it turns out that the ayu theme doesn't stylize inlay hints. It's the default style defined by VSCode which is applied. Using it give the expected render:

Screenshot from 2024-12-29 14-39-02

However VSCode uses a semi-transparent color for the background. Here is an alternative render using bg = colors.line for the background:

Screenshot from 2024-12-29 14-45-22

@Shatur
Copy link
Owner

Shatur commented Dec 29, 2024

Thank you a lot for looking into it! Also thanks for providing screenshots for all options!
In my opinion a separate color looks the best, despite it's not standard 🤔 Using "comment" color or "function" with background looks a bit distracting.

Here is an alternative render using bg = colors.line for the background:

This looks nice, but in my opinion without the background it's a bit better.
What do you think?

We probably better to leave the comment for this new color (that it's taken from VSCode not part actually a part of ayu).

@truelossless
Copy link
Contributor Author

I agree that without the background it looks less distracting and closer to VSCode, even if I quite like the Helix style. I've added a comment as you suggested!

@Shatur Shatur merged commit 283bada into Shatur:master Dec 29, 2024
2 checks passed
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.

No colors for LSP Inlay Hints
2 participants