You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The completion provider -- more precisely the completion parser -- appears to be too eager for grammar rule RHSs like
(k1=keywords '.')? k2=keywords;
with keywords: 'A' | 'B';.
In my experiments it directly matches the second call of rule keywords as soon as a A or B is given. However, some kind of local backtracking seems to be required here.
Besides, with the cursor being placed directly behind a valid keyword, the completion provider doesn't propose the next possible keyword, but just the one in left of the cursor.
(Actually, I run into this with k1 and k2 being assigned with cross references with different candidate scopes.)
I've prepared two tests, one with the leading part being optional as above, and one with it being mandatory.
The test expectation represent the current behavior, my expected results are added in comments:
Langium version:
3.0.0-next
Package name:
langium
The completion provider -- more precisely the completion parser -- appears to be too eager for grammar rule RHSs like
with
keywords: 'A' | 'B';
.In my experiments it directly matches the second call of rule
keywords
as soon as aA
orB
is given. However, some kind of local backtracking seems to be required here.Besides, with the cursor being placed directly behind a valid keyword, the completion provider doesn't propose the next possible keyword, but just the one in left of the cursor.
(Actually, I run into this with
k1
andk2
being assigned with cross references with different candidate scopes.)I've prepared two tests, one with the leading part being optional as above, and one with it being mandatory.
The test expectation represent the current behavior, my expected results are added in comments:
The text was updated successfully, but these errors were encountered: