You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vscode should send textDocument/signatureHelp after autocomplete result #70239
When attempting to implement function parameter auto complete in Flow, I wanted to support the same behavior as with TypeScript for function parameter autocompletion. It seems vscode + tsserver provides both the completion parameter helper and the signature helper as below:
However, when using communicating over LSP, vscode doesn't send the textDocument/signatureHelp request after the textDocument/completion response. Without this ability, it doesn't seem possible to match the same behavior in any LSP server implementation and provide the signatureHelp dialog in an editor agnostic way.
We have a great developer community over on slack where extension authors help each other. This is a great place for you to ask questions and find support.
Johannes Rieken (@jrieken) based on my experimentation, those triggers don’t get called from characters coming from completion.
Also, as far as I can tell, commands don’t work in this situation either because the client would need to have custom logic to respond to the workspace/executeCommand. In otherwords, the client doesn’t execute the raw commands, it wraps them in the executeCommand request and response.
Johannes Rieken (@jrieken) I don’t see these commands mentioned as part of the LSP specification. Under this assumption, this solution isn’t editor agnostic.
Johannes Rieken (@jrieken) i believe there is a solution that is editor agnostic that the LSP spec already supports that doesn’t require vscode specific protocols. So I don’t see this as a requiring any LSP spec changes.
To better align with the LSP spec in an editor agnostic way so that LSP servers don’t have to have any vscode specific code, the request here is for vscode to conform to the LSP spec in an editor agnostic way. Specifically, sending the signatureHelp request after the completion would solve this issue in an editor agnostic way.
Activity
vscodebot commentedon Mar 12, 2019
We have a great developer community over on slack where extension authors help each other. This is a great place for you to ask questions and find support.
Happy Coding!
jrieken commentedon Mar 12, 2019
You can use signature help trigger characters (like
(or,) and commands the get triggered after accepting a proposal, se https://github.com/Microsoft/vscode/blob/59dca36c224d885ba70741a2d47ebb46fe7f3bd2/src/vs/vscode.d.ts#L3406vicapow commentedon Mar 12, 2019
Johannes Rieken (@jrieken) based on my experimentation, those triggers don’t get called from characters coming from completion.
Also, as far as I can tell, commands don’t work in this situation either because the client would need to have custom logic to respond to the
workspace/executeCommand. In otherwords, the client doesn’t execute the raw commands, it wraps them in the executeCommand request and response.jrieken commentedon Mar 12, 2019
You use the UI command, e.g the one that you invoke via the keybinding, the id is
editor.action.triggerParameterHints. Then everything goes its ways.vicapow commentedon Mar 12, 2019
Johannes Rieken (@jrieken) I don’t see these commands mentioned as part of the LSP specification. Under this assumption, this solution isn’t editor agnostic.
jrieken commentedon Mar 12, 2019
If you want something editor agnostic that you shouldn't post issues in the vscode repository, but in LSP land
vicapow commentedon Mar 12, 2019
Johannes Rieken (@jrieken) i believe there is a solution that is editor agnostic that the LSP spec already supports that doesn’t require vscode specific protocols. So I don’t see this as a requiring any LSP spec changes.
To better align with the LSP spec in an editor agnostic way so that LSP servers don’t have to have any vscode specific code, the request here is for vscode to conform to the LSP spec in an editor agnostic way. Specifically, sending the signatureHelp request after the completion would solve this issue in an editor agnostic way.
vicapow commentedon Mar 15, 2019
Johannes Rieken (@jrieken) is there no interest from the vscode team to implement this feature using only editor agnostic LSP commands?