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

feat: add inlay hint support #70

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

lynzrand
Copy link

@lynzrand lynzrand commented Nov 26, 2022

Added inlay hint color for the theme.

I'm not very sure about the color selection -- I'm currently using the color 'gray' in the color scheme as the text color for regular inlay hints, and the {color}1 version of the type and parameter color for type/parameter inlay hints.

Before: #68

After:

图片

图片

(closes #68)

"editorInlayHint.background": "#3c383680",
"editorInlayHint.foreground": "#928374",
"editorInlayHint.typeForeground": "#d79921",
"editorInlayHint.paramForeground": "#458588",
Copy link

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

@lynzrand
Copy link
Author

After fixing the parameter foreground color, the inlay hints now look like this:

图片

图片

@Minnozz
Copy link

Minnozz commented Dec 30, 2022

(Note: I am just a user of this theme, not a maintainer)

I think your changes greatly improve the visuals of inlay hints compared to master. However, I would personally prefer a bit more contrast between the background of the inlay hints and the overall background of the theme, because with this version they blend in with the "real" code a bit.

@lynzrand
Copy link
Author

lynzrand commented Jan 2, 2023

For me the current background works just fine, but if adding a bit of contrast makes it better I'll do that. You can test out the idea yourself by changing the line

"editorInlayHint.background": "#3c383680",

into

"editorInlayHint.background": "#3c3836",

which makes the background opaque instead of 50% transparent. I'm looking forward to your test results!

@Minnozz
Copy link

Minnozz commented Jan 8, 2023

@lynzrand I personally prefer the version with #3c3836!

@jdinhify
Copy link
Owner

Thanks @lynzrand , and apologies for not being able to review this sooner 🙏

I agree with @Minnozz that I would appreciate more contrast for the inlay background, so please use the one without the alpha.

I'm keen to hear your feedback on this suggestion though: just set the inlay background, and remove the setting for all foregrounds - this will use similar color to code comments for all foregrounds. The reason is that these inlays are more "helper" type instead of real code, so I think treating them as such might make more senses?

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.

Inlay hints show odd colour
3 participants