Langium - v4.4.0
    Preparing search index...

    Class DefaultCompletionProvider

    Language-specific service for handling completion requests.

    Hierarchy (View Summary)

    Implements

    Index
    astReflection: AstReflection
    clientCapabilities?: CompletionClientCapabilities
    completionOptions?: CompletionProviderOptions

    Contains the completion options for this completion provider.

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

    completionParser: LangiumCompletionParser
    documentationProvider: DocumentationProvider
    fuzzyMatcher: FuzzyMatcher
    grammar: Grammar
    grammarConfig: GrammarConfig
    lexer: Lexer
    nameProvider: NameProvider
    nodeKindProvider: NodeKindProvider
    scopeProvider: ScopeProvider
    • Returns an InsertReplaceEdit to enable clients to pick either the insert TextEdit or the replace TextEdit, depending on the editor's insert/replace mode. Note that the token part to the left of the cursor will be overwritten in both modes.

      Parameters

      Returns InsertReplaceEdit | undefined

    • A TextEdit is returned for clients without insert/replace mode configuration. The range of a TextEdit ends at the cursor position, so the suffix of an identifier after the cursor (e.g. Pos|ition) is never replaced.

      Parameters

      Returns TextEdit | undefined

    • Indicates whether the completion should continue to process the next completion context.

      The default implementation continues the completion only if there are currently no proposed completion items.

      Parameters

      • items: CompletionItem[]

      Returns boolean

    • The completion algorithm could yield the same reference/keyword multiple times.

      This methods deduplicates these items afterwards before returning to the client. Unique items are identified as a combination of kind, label and detail.

      Parameters

      • items: CompletionItem[]

      Returns CompletionItem[]