Skip to content

Conversation

@rubenporras
Copy link
Contributor

No description provided.

// Use @link{TextDocumentSaveReason.Manual} as the platform does not give enough information to be accurate
final var params = new WillSaveTextDocumentParams(identifier, TextDocumentSaveReason.Manual);

CompletableFuture<@Nullable List<TextEdit>> edits = languageServerWrapper.executeImpl(ls -> ls.getTextDocumentService().willSaveWaitUntil(params));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember whether the return value of "executeImpl" is actually cancellable.
The best way to check that is to enable the log, get into a case where cancellation happens, and then check is the $cancel request was send from LSP4E to the LS. Did you verify it that way?
IIRC there is also a test case somewhere about cancellation that intercept those cancellation request between client and LS to verify them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not though about that. Thanks for the hint. I will check.

@rubenporras rubenporras marked this pull request as draft January 6, 2025 14:45
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