Skip to content

Serialize code completion requests to LSP#514

Merged
breedloj merged 2 commits intomainfrom
breedloj/suggestionFixes
Nov 10, 2025
Merged

Serialize code completion requests to LSP#514
breedloj merged 2 commits intomainfrom
breedloj/suggestionFixes

Conversation

@breedloj
Copy link
Contributor

@breedloj breedloj commented Nov 7, 2025

Issue #, if available:
#511

Description of changes:
The LSP no longer supports concurrent completion requests and will effectively drop concurrent requests. Eclipse's implementation was designed to 'fire and forget' and thus important requests are now being lost. This change reworks the logic to constrain a single completion request to be processed at any given time, and queues the latest request to be subsequently processed (dropping any intermediates in the interim). Goal to to process only the latest, most relevant suggest request whilst allowing an in-flight request to gracefully complete with the appropriate LSP callback.

Some additional refactoring to make this component (very) slightly less unreadable. Also added additional logic to ignore rendering if the character carat position has changed to avoid out-of-place suggestions being rendered in the new location.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@breedloj breedloj merged commit 7bf189b into main Nov 10, 2025
3 checks passed
@breedloj breedloj deleted the breedloj/suggestionFixes branch November 10, 2025 18:57
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