Skip to content

Providers should return undefined#383

Open
LenKrause wants to merge 1 commit into
BBx-Kitchen:mainfrom
LenKrause:returnUndefined
Open

Providers should return undefined#383
LenKrause wants to merge 1 commit into
BBx-Kitchen:mainfrom
LenKrause:returnUndefined

Conversation

@LenKrause

Copy link
Copy Markdown

Providers should return undefined instead of an empty list to allow other providers to continue

@StephanWald

Copy link
Copy Markdown
Member

Thanks for the PR! The change makes sense — returning undefined lets other providers contribute when field completion offers nothing.

One thing to consider: with this change, typing # outside a class method will now fall through to the default Langium completion provider (keywords, references, etc.). Previously the empty list would short-circuit that. Is that the behavior you're after?

For context, we intentionally kept the ( trigger path returning an empty list (line 28) to prevent exactly that kind of
slow fallthrough — so this creates an asymmetry between the two trigger characters. If the fallthrough after # outside
class methods is desirable, it might be worth adding a comment explaining why # and ( behave differently.

StephanWald pushed a commit that referenced this pull request Mar 29, 2026
…st from getFieldCompletion to allow other providers to continue
@LenKrause

LenKrause commented Mar 30, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants