typst-lsp
typst-lsp copied to clipboard
parameter help not shown when command was completed
When removing the parenthesis and adding them again it works as expected.
I confirm this. To be clear: when one starts to write a command, e.g. #tabl and then hits tab to autocomplete the suggestion (#table), the autocompleted code looks like #table() with the cursor between the parentheses, but no tooltip is shown for the arguments.
Maybe @jakobhellermann has an idea here?
See https://github.com/microsoft/language-server-protocol/issues/274
I tried to add the editor.action.triggerParameterHints command for all CompletionItems but it doesn't work for me, and would also be only a solution for clients that implement this command.
Parameter hints were my only other idea I wanted to try out, I'm not sure if there is another better way
https://github.com/beeb/typst-lsp/blob/completion-to-param-hint/src/main.rs#L438-L442
Feel free to try it out, but doesn't work for me.
I just noticed that this does not work in other language servers either (for example clangd). What clangd does instead is just auto complete the required parameters. They can then be changed and switched between by pressing tab.