ntt icon indicating copy to clipboard operation
ntt copied to clipboard

Add support for textDocument/inlayHint

Open mliszcz opened this issue 2 years ago • 4 comments

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

Fixes #701.

mliszcz avatar Sep 28 '23 18:09 mliszcz

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 avatar Sep 28 '23 18:09 mliszcz

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

mliszcz avatar Sep 28 '23 18:09 mliszcz

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

5nord avatar Sep 29 '23 11:09 5nord

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!

mliszcz avatar Sep 29 '23 14:09 mliszcz