grain
grain copied to clipboard
LSP: Add support for inlay hints
Many languages like Javascript/ typescript, rust(through rust-analyzer VS code extension) provide support for inlay hint in VS Code as shown below.inlay hint provides hints for type of variable defined in a different colored text as shown below:
The inlay hints are optional can can be enabled by user. If grain lang could provide similar support, it could improve the developer experience greatly.
I definitely want this feature! It makes our excellent type inference even nicer.
I believe these would be provided via https://github.com/grain-lang/grain/tree/main/compiler/src/language_server so I'm going to move the issue to the main grain repo and rename.
Ooh, I wasn't even aware of this, but it's very coool.
This is now in progress.
Thanks @marcusroberts This fantastic!!
This is now in progress.
With #1793 the framework to add these was setup and inlay hints were added for module names.
We probably do not want to close this issue just yet given the original ask looks to have been for inlay types, so we may want to rename this.
Another expansion if we dont change the name is the idea of inlay parameter labels. for postional arguments we could inlay labels to create more clarity on what each parameter is.