Skip to content

The ReferenceInfo.index is always missing from the completion provider #2026

@raylras

Description

@raylras

Langium version: 4.0.0
Package name: langium

Related discussion: #2025

Steps To Reproduce

  • Not applicable

Link to code example:

The ReferenceInfo interface has an index property:

/**
* Information about a cross-reference. This is used when traversing references in an AST or to describe
* unresolved references.
*/
export interface ReferenceInfo {
reference: Reference | MultiReference
container: AstNode
property: string
index?: number
}

However, the completion provider always misses it:

const refInfo: ReferenceInfo = {
reference,
container: node,
property: assignment.feature
};

The current behavior

The refInfo is missing the index in any case.

The expected behavior

The index should be set if available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    completionCompletion related issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions