Skip to content

Conversation

leonrinkel
Copy link

This PR enables JSONWorkerContribution to contribute array value completions. I originally requested this feature in #263 and have now taken a first stab at implementing it. To avoid changing the API, I reused collectValueCompletions, but it doesn't feel like the best fit for this use case. Another approach might be introducing something like collectArrayCompletions, possibly with better fitting attributes like the index the cursor is at. I'm happy to hear your thoughts and feedback!

This enables a JSONWorkerContribution to contribute array value
completions.
@leonrinkel
Copy link
Author

@microsoft-github-policy-service agree

@aeschli
Copy link
Collaborator

aeschli commented Jun 30, 2025

Thanks for looking at this!
I agree that it would be better to add collectArrayCompletions as an new (optional) callback.
It might look like that:
collectArrayCompletions(uri: string, location: JSONPath, index: number, result: CompletionsCollector): PromiseLike<any>

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