The signature help request is sent from the client to the server to request signature information at a given cursor position.
Changed:: in 2.0 the requests uses TextDocumentPositionParams with a proper textDocument and position property. In 1.0 the uri of the referenced text document was inlined into the params object.
Request
method: 'textDocument/signatureHelp'
param: TextDocumentPositionParams
Response
result: SignatureHelp defined as follows:
/**
* Signature help represents the signature of something
* callable. There can be multiple signature but only one
* active and only one active parameter.
*/
interface SignatureHelp {
/**
* One or more signatures.
*/
signatures: SignatureInformation[];
/**
* The active signature.
*/
activeSignature?: number;
/**
* The active parameter of the active signature.
*/
activeParameter?: number;
}
/**
* Represents the signature of something callable. A signature
* can have a label, like a function-name, a doc-comment, and
* a set of parameters.
*/
interface SignatureInformation {
/**
* The label of this signature. Will be shown in
* the UI.
*/
label: string;
/**
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation?: string;
/**
* The parameters of this signature.
*/
parameters?: ParameterInformation[];
}
/**
* Represents a parameter of a callable-signature. A parameter can
* have a label and a doc-comment.
*/
interface ParameterInformation {
/**
* The label of this signature. Will be shown in
* the UI.
*/
label: string;
/**
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation?: string;
}
error: code and message set in case an exception happens during the signature help request.
Signature Help
The signature help request is sent from the client to the server to request signature information at a given cursor position.
Request
TextDocumentPositionParams
Response
SignatureHelp
defined as follows: