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

Add support for textDocument/inlayHint #702

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Conversation

mliszcz
Copy link
Contributor

@mliszcz mliszcz commented Sep 28, 2023

This PR adds initial support for inlay hints (only textDocument/inlayHint method) for function and template calls.

Fixes #701.

The following are added manually to the generated code:
* inlayHint/resolve
* textDocument/inlayHint

Generating this code is currently not possible since the upstream gopls
generator was migrated from Typescript to Go just before the 3.17 LSP
release. Using the new generator requires some more work and adaptions
on our side.
@mliszcz
Copy link
Contributor Author

mliszcz commented Sep 28, 2023

Ping @5nord

This is a 3.17 LSP feature. I manually copied the new structures from gopls. They no longer use the typescript-based codegen scripts. For now this seems to work. I suggest tackling the proper (automated) protocol upgrade separately in a new PR.

@mliszcz
Copy link
Contributor Author

mliszcz commented Sep 28, 2023

This is how it looks in neovim (nightly) with also semantic tokens enabled. Neovim does not work well with dynamic capabilities yet, I needed to tweak the plugin a bit. I can share my config if you want to try this. I also tried vscode but it looks like the client does not send the inlayHint capability - perhaps the extension needs to be updated.

image

@5nord
Copy link
Member

5nord commented Sep 29, 2023

I will review your PR in a few days, when I am back from child leave. Is that okay with you?

@mliszcz
Copy link
Contributor Author

mliszcz commented Sep 29, 2023

I will review your PR in a few days, when I am back from child leave. Is that okay with you?

That is perfectly fine. I am aware you're on leave, that's why I reached out on github. Thanks!

@5nord 5nord merged commit 56d60ca into nokia:master Jul 23, 2024
1 check passed
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.

Support for Inlay Hints
2 participants