feat: support dynamic registration for textDocument/completion#1361
Merged
mickaelistria merged 1 commit intoeclipse-lsp4e:mainfrom Nov 2, 2025
Merged
feat: support dynamic registration for textDocument/completion#1361mickaelistria merged 1 commit intoeclipse-lsp4e:mainfrom
mickaelistria merged 1 commit intoeclipse-lsp4e:mainfrom
Conversation
Apply dynamically registered CompletionOptions (including triggerCharacters) to server capabilities so content assist auto-activation and proposals reflect the server's runtime settings
Contributor
|
Great addition! let's merge. |
rubenporras
reviewed
Nov 3, 2025
| CompletionOptions.class); | ||
| serverCapabilities.setCompletionProvider(completionOpts); | ||
| addRegistration(reg, () -> serverCapabilities.setCompletionProvider(previous)); | ||
| } catch (final Exception ex) { |
Contributor
There was a problem hiding this comment.
@sebthom:
I think the blocks for case "workspace/executeCommand" and case "textDocument/completion" should be structured in the same way. With that in mind, should we not just re-raise the exception to the caller, as he provided a malformed Json as we would do in case "workspace/executeCommand" on line 1071?
Or alternative, what exceptions are we catching? A JsonSyntaxException? If so, could we be more specific and catch just that one and then do the same for the block case "workspace/executeCommand"?
Member
Author
There was a problem hiding this comment.
Yeah it was for the gson. I thought rather catch any error and not have that capability than not initialize the LS properly at all.
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.
Apply dynamically registered CompletionOptions (including triggerCharacters) to server capabilities so content assist auto-activation and proposals reflect the server's runtime settings
This is required for e.g. integrating vscode-markdown-language-server into wildwebdeveloper to support auto-completion/path suggestions eclipse-wildwebdeveloper/wildwebdeveloper#1949