Langium - v4.0.0
    Preparing search index...

    Interface WorkspaceManager

    The workspace manager is responsible for finding source files in the workspace. This service is shared between all languages of a language server.

    interface WorkspaceManager {
        initialBuildOptions: undefined | BuildOptions;
        ready: Promise<void>;
        get workspaceFolders(): undefined | readonly WorkspaceFolder[];
        initialize(params: InitializeParams): void;
        initialized(params: InitializedParams): Promise<void>;
        initializeWorkspace(
            folders: WorkspaceFolder[],
            cancelToken?: Cancellation.CancellationToken,
        ): Promise<void>;
        searchFolder(uri: URI): Promise<URI[]>;
        shouldIncludeEntry(entry: FileSystemNode): boolean;
    }

    Implemented by

    Index

    Properties

    initialBuildOptions: undefined | BuildOptions

    The options used for the initial workspace build.

    ready: Promise<void>

    A promise that resolves when the workspace manager is ready to be used. Use this to ensure that the workspace manager has finished its initialization.

    Accessors

    Methods

    • When used in a language server context, this method is called when the server receives the initialized notification.

      Parameters

      • params: InitializedParams

      Returns Promise<void>

    • Searches for workspace files in the given folder and its subdirectories. Note that this method does not create documents for the found files.

      Parameters

      • uri: URI

        The URI of the folder to search in.

      Returns Promise<URI[]>

      A promise that resolves to an array of URIs of the found files.