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

LSP: Add support for inlay hints #1359

Open
sanathusk opened this issue Jul 15, 2022 · 5 comments · May be fixed by #2005
Open

LSP: Add support for inlay hints #1359

sanathusk opened this issue Jul 15, 2022 · 5 comments · May be fixed by #2005
Assignees
Labels
enhancement lsp Issues related to the language server.

Comments

@sanathusk
Copy link
Contributor

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:
image
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.

@phated
Copy link
Member

phated commented Jul 15, 2022

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.

@phated phated transferred this issue from grain-lang/grain-language-server Jul 15, 2022
@phated phated changed the title Add support for inlay hint for grain lang in VS Code LSP: Add support for inlay hints Jul 15, 2022
@marcusroberts
Copy link
Member

Ooh, I wasn't even aware of this, but it's very coool.

@marcusroberts marcusroberts self-assigned this Sep 5, 2022
@phated phated self-assigned this Feb 16, 2023
@marcusroberts
Copy link
Member

This is now in progress.

@sanathusk
Copy link
Contributor Author

Thanks @marcusroberts This fantastic!!

@spotandjake
Copy link
Member

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.

@spotandjake spotandjake added the lsp Issues related to the language server. label Jul 21, 2023
@spotandjake spotandjake linked a pull request Feb 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement lsp Issues related to the language server.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants