Replies: 2 comments 1 reply
-
|
Hey @raylras, we probably never noticed that because we usually build our grammar in a way that it does not depend on the ordering of specific array elements. You can rewrite those kinds of imports using a different syntax that does not depend on array indices: This also makes scoping much easier. However, it definitely makes sense to add the array indices to the completion context. Do you mind creating an issue for that? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Related issue: #2026 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Some cross-reference syntaxes rely on the
indexof refInfo when calculating scope.langium/packages/langium/src/syntax-tree.ts
Lines 137 to 146 in 38d5f16
For example:
During normal parsing, the
indexproperty is set correctly. However, in the case of a completion provider, theindexis alwaysundefined.langium/packages/langium/src/lsp/completion/completion-provider.ts
Lines 444 to 448 in 38d5f16
We can see that the
indexproperty is missing here in any case.If we want to complete cross-refs like the ones below, providing the
indexis necessary.Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions