Skip to content

TypeQLiteCompletionProvider

Defined in: libs/language/src/typeqlite-completion.ts:23

Completion for TypeQLite.

Langium already completes keywords, and cross-references from their scope: owns, sub and plays in a define, which since ADR-008 D3 means the whole workspace. What it cannot complete is a label that is a plain ID (isa |, has |, a role player), because there is no scope to ask. Those positions are listed in LABEL_POSITIONS, and offer the workspace’s definitions of the kind each one expects (ADR-008 D5).

Constructors

Name Description
new TypeQLiteCompletionProvider() Created with the language’s services by TypeQLiteModule.

Properties

Name Description
completionOptions? Contains the completion options for this completion provider.

Methods

Name Description
getCompletion() Handle a completion request.

new TypeQLiteCompletionProvider(services): TypeQLiteCompletionProvider

Defined in: libs/language/src/typeqlite-completion.ts:31

Created with the language’s services by TypeQLiteModule.

LangiumGeneratedCoreServices & LangiumDefaultCoreServices & LangiumLSPServices & object

Langium’s services, with the label resolver.

TypeQLiteCompletionProvider

DefaultCompletionProvider.constructor

readonly optional completionOptions?: CompletionProviderOptions

Defined in: node_modules/langium/lib/lsp/completion/completion-provider.d.ts:117

Contains the completion options for this completion provider.

If multiple languages return different options, they are merged before being sent to the language client.

DefaultCompletionProvider.completionOptions

getCompletion(document, params, _cancelToken?): Promise<CompletionList | undefined>

Defined in: node_modules/langium/lib/lsp/completion/completion-provider.d.ts:120

Handle a completion request.

LangiumDocument

the document for which the completion request was triggered

CompletionParams

the completion parameters

CancellationToken

Promise<CompletionList | undefined>

OperationCancelled if cancellation is detected during execution

ResponseError if an error is detected that should be sent as response to the client

DefaultCompletionProvider.getCompletion

TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.