tinymist icon indicating copy to clipboard operation
tinymist copied to clipboard

Properly trigger suggest (`textDocument/complete`) and parameterHints (`textDocument/`) in suitable timings

Open Myriad-Dreamin opened this issue 1 month ago • 1 comments

Describe the bug

The python lsps are exemplary.

I need an approach to invoke editor.action.triggerSuggest and editor.action.triggerParameterHints at the same time, after a field completion, but I don't find a way other than letting client provide an extra commands, https://github.com/Myriad-Dreamin/tinymist/blob/f167ad152449c631e5946187efd2ba1772612f02/editors/vscode/src/extension.ts#L161. This is because https://github.com/microsoft/language-server-protocol/issues/1117. I looked at rust-analyzer, and find that the parameter hints (signature help) keeps until exiting a function autocompletion. That is, if tinymist does same thing as ra, when I type text, tinymist will complete text(${content-arg}, fill: ${fill-arg}, stroke: ${stroke-arg}, ..), and I will continue finishing my function call for tabs and go to ${content-arg}, ${fill-arg}, and so on. however it is probably not what we would like to have, as we usually write text(fill: blue) and then add a content arguments by []. I may look at python lsps then.

Package/Software version:

tinymist extension version: v0.11.8.

Myriad-Dreamin avatar May 15 '24 09:05 Myriad-Dreamin