Interface DidCloseTextDocumentFeatureShape

A dynamic feature can be activated via the server.

interface DidCloseTextDocumentFeatureShape {
    fillInitializeParams?: (params: InitializeParams) => void;
    onNotificationSent: Event<
        NotificationSendEvent<DidCloseTextDocumentParams>,
    >;
    preInitialize?: (
        capabilities: ServerCapabilities,
        documentSelector: undefined | DocumentSelector,
    ) => void;
    registrationType: RegistrationType<TextDocumentRegistrationOptions>;
    clear(): void;
    fillClientCapabilities(capabilities: ClientCapabilities): void;
    getProvider(
        document: TextDocument,
    ): undefined | { send: (textDocument: TextDocument) => Promise<void> };
    getState(): FeatureState;
    initialize(
        capabilities: ServerCapabilities,
        documentSelector: undefined | DocumentSelector,
    ): void;
    register(data: RegistrationData<TextDocumentRegistrationOptions>): void;
    unregister(id: string): void;
}

Hierarchy (View Summary)

Properties

fillInitializeParams?: (params: InitializeParams) => void

Called to fill the initialize params.

the initialize params.

preInitialize?: (
    capabilities: ServerCapabilities,
    documentSelector: undefined | DocumentSelector,
) => void

A preflight where the server capabilities are shown to all features before a feature is actually initialized. This allows feature to capture some state if they are a pre-requisite for other features.

Type declaration

    • (
          capabilities: ServerCapabilities,
          documentSelector: undefined | DocumentSelector,
      ): void
    • Parameters

      • capabilities: ServerCapabilities

        the server capabilities

      • documentSelector: undefined | DocumentSelector

        the document selector pass to the client's constructor. May be undefined if the client was created without a selector.

      Returns void

The signature (e.g. method) for which this features support dynamic activation / registration.

Methods