Skip to content

Conversation

@sebthom
Copy link
Member

@sebthom sebthom commented Nov 2, 2025

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

Apply dynamically registered CompletionOptions (including
triggerCharacters) to server capabilities so content assist
auto-activation and proposals reflect the server's runtime settings
@mickaelistria
Copy link
Contributor

Great addition! let's merge.

@mickaelistria mickaelistria merged commit e4debae into eclipse-lsp4e:main Nov 2, 2025
11 checks passed
CompletionOptions.class);
serverCapabilities.setCompletionProvider(completionOpts);
addRegistration(reg, () -> serverCapabilities.setCompletionProvider(previous));
} catch (final Exception ex) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@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"?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

@sebthom sebthom deleted the dynamic-reg branch November 9, 2025 18:47
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.

3 participants