class LSProtocol::SignatureHelp

Overview

Signature help represents the signature of something callable. There can be multiple signature but only one active and only one active parameter.

Included Modules

Defined in:

lsprotocol/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(signatures : Array(SignatureInformation) | Nil, active_parameter : UInt32 | Nil = nil, active_signature : UInt32 | Nil = nil) #

[View source]

Instance Method Detail

def active_parameter : UInt32 | Nil #

The active parameter of the active signature.

If null, no parameter of the signature is active (for example a named argument that does not match any declared parameters). This is only valid if the client specifies the client capability textDocument.signatureHelp.noActiveParameterSupport === true

If omitted or the value lies outside the range of signatures[activeSignature].parameters defaults to 0 if the active signature has parameters.

If the active signature has no parameters it is ignored.

In future version of the protocol this property might become mandatory (but still nullable) to better express the active parameter if the active signature does have any.


[View source]
def active_signature : UInt32 | Nil #

The active signature. If omitted or the value lies outside the range of #signatures the value defaults to zero or is ignored if the SignatureHelp has no signatures.

Whenever possible implementors should make an active decision about the active signature and shouldn't rely on a default value.

In future version of the protocol this property might become mandatory to better express this.


[View source]
def signatures : Array(SignatureInformation) #

One or more signatures.


[View source]