nokia / ntt

Modern tools for TTCN-3
https://nokia.github.io/ntt/
BSD 3-Clause "New" or "Revised" License
71 stars 33 forks source link

Add support for textDocument/inlayHint #702

Closed mliszcz closed 3 months ago

mliszcz commented 1 year ago

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

Fixes #701.

mliszcz commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

mliszcz commented 1 year ago

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!