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(grainlsp): Implement inlay hints for module includes #1793

Merged
merged 10 commits into from
Apr 15, 2023

Conversation

marcusroberts
Copy link
Member

Establish framework for adding inlay hints with the LSP.

Show hint for name of module included (useful for where the module name differs from what you might guess from the included file name)

@marcusroberts
Copy link
Member Author

This is a minimal implementation of inlay hints. We can easily add any we want when iterating through the typed tree.
For better performance this should be scoped to the range specified by the editor in the request.

Copy link
Member

@spotandjake spotandjake left a comment

Choose a reason for hiding this comment

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

Looks great, I had one comment but its really a style thing and either way I think this looks good.

compiler/src/language_server/inlayhint.re Outdated Show resolved Hide resolved
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

This looks great! 🎉 I hope the patterns were easy to follow. I had a few nit suggestions, but otherwise looks good.

@phated phated changed the title feat(grainlsp): Implement minimal inlay hints for module includes feat(grainlsp): Implement inlay hints for module includes Apr 15, 2023
@phated phated added this pull request to the merge queue Apr 15, 2023
Merged via the queue into main with commit 408da76 Apr 15, 2023
@phated phated deleted the marcus/lsp_inlay_hints branch April 15, 2023 21:36
av8ta pushed a commit to av8ta/grain that referenced this pull request Apr 18, 2023
…#1793)

* Add initial capability for inlay hints

* Added inlay hint capability

* Added simple test of printing out an inline value

* Debug

* Cleaned up and formatted the code

* Nit cleanup after review

* Remove whitespace

---------

Co-authored-by: marcusroberts <marcus@marcusr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants