Support experimental language server#1183
Draft
aspeddro wants to merge 6 commits into
Draft
Conversation
aspeddro
commented
Jun 20, 2026
Comment on lines
+612
to
+614
| .sendNotification(DidChangeConfigurationNotification.type, { | ||
| settings: null, | ||
| }) |
Contributor
Author
There was a problem hiding this comment.
The notification workspace/didChangeConfiguration params must have settings field. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#didChangeConfigurationParams
This was breaking the experimental server.
79 tasks
aspeddro
commented
Jun 20, 2026
Comment on lines
+126
to
+134
| middleware: { | ||
| workspace: { | ||
| configuration: async (_params, _token, _next) => { | ||
| // For the experimental server, we don't want to send the full configuration | ||
| // We send only setting inside rescript.settings, i.e, server settings | ||
| return [workspace.getConfiguration("rescript.settings")]; | ||
| }, | ||
| }, | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
If we don't use middleware, the server will retrieve all fields within rescript, but we only want rescript.settings. Otherwise, the server fails to parse the received JSON.
aspeddro
commented
Jun 20, 2026
|
|
||
| function createExperimentalLanguageClient(serverPath: string) { | ||
| if (!fs.existsSync(serverPath)) { | ||
| const message = `The experimental server is enabled with \`experimentalServerPath\`, but no language server was found at ${serverPath}. See the instructions for using the experimental server in [ADD_LINK_TO_DOCS_HERE].`; |
Contributor
Author
There was a problem hiding this comment.
Remove See the instructions...
Contributor
Author
|
Oh my god Windows 😮💨 |
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.
Summary
rescript.experimentalServerPath(string | null) - optional path to a custom-built experimental server binary.rescript.settings.hover.supportMarkdownLinks(bool) - enable markdown link in hover responses. Default is trueRelated rescript-lang/rescript#8425