Interface StaticFeature

A static feature. A static feature can't be dynamically activated via the server. It is wired during the initialize sequence.

interface StaticFeature {
    fillInitializeParams?: (params: InitializeParams) => void;
    preInitialize?: (
        capabilities: ServerCapabilities,
        documentSelector: undefined | DocumentSelector,
    ) => void;
    clear(): void;
    fillClientCapabilities(capabilities: ClientCapabilities): void;
    getState(): FeatureState;
    initialize(
        capabilities: ServerCapabilities,
        documentSelector: undefined | DocumentSelector,
    ): void;
}

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

Methods