Class DefaultWorkspaceManager

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

Implements

Constructors

Properties

_ready: Deferred<void> = ...
documentBuilder: DocumentBuilder
fileSystemProvider: FileSystemProvider
folders?: WorkspaceFolder[]
initialBuildOptions: BuildOptions = {}

The options used for the initial workspace build.

langiumDocuments: LangiumDocuments
serviceRegistry: ServiceRegistry

Accessors

Methods

  • Does the initial indexing of workspace folders. Collects information about exported and referenced AstNodes in each language file and stores it locally.

    Parameters

    • folders: WorkspaceFolder[]

      The set of workspace folders to be indexed.

    • cancelToken: CancellationToken = CancellationToken.None

      A cancellation token that can be used to cancel the operation.

    Returns Promise<void>

    OperationCancelled if a cancellation event has been detected

  • Load all additional documents that shall be visible in the context of the given workspace folders and add them to the collector. This can be used to include built-in libraries of your language, which can be either loaded from provided files or constructed in memory.

    Parameters

    Returns Promise<void>