parse formatting options in initialization, and pull editor scope during Configuration #2717
Open
iisaduan wants to merge 19 commits intomicrosoft:mainfrom
Open
parse formatting options in initialization, and pull editor scope during Configuration #2717iisaduan wants to merge 19 commits intomicrosoft:mainfrom
editor scope during Configuration #2717iisaduan wants to merge 19 commits intomicrosoft:mainfrom
Conversation
editor scope during Configuration
jakebailey
reviewed
Feb 13, 2026
jakebailey
reviewed
Feb 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables the language server to accept formatting options during initialization and updates configuration parsing to support the new js/ts configuration key alongside existing typescript and javascript keys. It also adds support for editor settings to configure formatting preferences.
Changes:
- Added support for receiving formatting options via
initializationOptionsin the initialization request - Updated configuration parsing to use a map-based approach with support for
js/ts,typescript,javascript, andeditorkeys - Fixed numeric type parsing to handle float64 values from JSON (addressing the indenting issue where
indentSize = 2was being ignored)
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/baselines/reference/fourslash/state/codeLensAcrossProjects.baseline | Updated test baseline to reflect the new js/ts configuration key |
| internal/project/session_test.go | Updated test calls to use map-based configuration instead of array-based |
| internal/lsp/server.go | Added initialization options parsing, updated configuration request handling to include editor settings, and simplified didChangeConfiguration handling |
| internal/lsp/lsproto/lsp_generated.go | Added Typescript field to InitializationOptions struct for receiving formatting preferences |
| internal/lsp/lsproto/_generate/generate.mts | Added typescript field to custom structures and fixed OrType name parsing |
| internal/ls/lsutil/userpreferences.go | Added float64 case to handle JSON numeric parsing |
| internal/ls/lsutil/formatcodeoptions.go | Added ParseEditorSettings method to parse editor-level formatting options |
| internal/ls/lsutil/configuration.go | Refactored configuration parsing from array-based to map-based approach |
| internal/fourslash/fourslash.go | Updated test configuration to use js/ts key instead of typescript |
jakebailey
reviewed
Feb 13, 2026
jakebailey
reviewed
Feb 13, 2026
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.
PR includes changes that allow VS to be configured:
initializationOptionsdidChangeConfigurationto work in both VS and VSCodeUpdates the server's parsing of
ConfigurationanddidChangeConfigurationresults to be inline with changes in Resolve/merge configuration on the client #2766 and Clean up JS/TS language specific setting settings vscode#292934 / Adopt unified js/ts setting for suggest vscode#295055Bugfixes:
indentSize = 2.