Providers should return undefined#383
Open
LenKrause wants to merge 1 commit into
Open
Conversation
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 |
StephanWald
pushed a commit
that referenced
this pull request
Mar 29, 2026
…st from getFieldCompletion to allow other providers to continue
Author
|
Stephan-
Our extension also provides completion after a # entry when inside a class
method. It stopped working after a recent upgrade of your extension. I
tracked it down to the code changes proposed.
When multiple providers in the same or different extensions return something, VS
Code will show all responses. But returning an empty list means quit checking
other providers so our code is not executed.
As your extension evolves, we may be able to remove our response to a # entry,
but for a long time it has been necessary.
-Len
On Sun, Mar 29, 2026 at 11:55 AM Stephan Wald ***@***.***> wrote:
StephanWald left a comment (BBx-Kitchen/bbj-language-server#383) 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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Providers should return undefined instead of an empty list to allow other providers to continue