Skip to content

SignatureHelpContext support #797

@KamasamaK

Description

@KamasamaK

Just as there is a CompletionContext, there should also be a SignatureHelpContext. The VS Code API has this already. I've copied the definition below.

interface SignatureHelpContext {
	/**
	 * Action that caused signature help to be triggered.
	 */
	readonly triggerKind: SignatureHelpTriggerKind;

	/**
	 * Character that caused signature help to be triggered.
	 *
	 * This is `undefined` when signature help is not triggered by typing, such as when manually invoking
	 * signature help or when moving the cursor.
	 */
	readonly triggerCharacter?: string;

	/**
	 * `true` if signature help was already showing when it was triggered.
	 *
	 * Retriggers occur when the signature help is already active and can be caused by actions such as
	 * typing a trigger character, a cursor move, or document content changes.
	 */
	readonly isRetrigger: boolean;

	/**
	 * The currently active [`SignatureHelp`](#SignatureHelp).
	 *
	 * The `activeSignatureHelp` has its [`SignatureHelp.activeSignature`] field updated based on
	 * the user arrowing through available signatures.
	 */
	readonly activeSignatureHelp?: SignatureHelp;
}

Resolves #561

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions