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

Inlay Type Hints in Variable Declarations #1444

Merged
merged 12 commits into from
Sep 20, 2023

Conversation

Koranir
Copy link
Contributor

@Koranir Koranir commented Sep 16, 2023

Screenshot from 2023-09-17 19-03-00

Adds inlay hints to variable declarations - useful for making sure a type is what you think zls thinks it is without having to hover over a variable name.
fixes #318

@Koranir
Copy link
Contributor Author

Koranir commented Sep 17, 2023

Can confirm that #1445 solves the issue with inferring types.

@Koranir Koranir marked this pull request as ready for review September 17, 2023 00:20
@Techatrix Techatrix force-pushed the more-inlay-hints branch 2 times, most recently from a630c60 to ccee683 Compare September 17, 2023 02:42
Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

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

This will need some tests to make sure it is working correctly and avoid future regressions.
I've added two commits to your branch that should allow you to write some new tests like this.
If there is anything that I can do to help, don't hesitate to ask.

@Koranir Koranir changed the title More Type Hints Inlay Type Hints in Variable Declarations Sep 17, 2023
Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

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

just one more thing and then we are done. everything else looks great.

@Techatrix Techatrix merged commit 20b8078 into zigtools:master Sep 20, 2023
KoltPenny pushed a commit to KoltPenny/zls that referenced this pull request Oct 18, 2023
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.

[Feature Request] Type inference in editor
2 participants