Skip to content

feat: allow format range to be undefined#272

Merged
aeschli merged 1 commit intomicrosoft:mainfrom
nanokind:feature/allow-format-range-to-be-undefined
Jun 30, 2025
Merged

feat: allow format range to be undefined#272
aeschli merged 1 commit intomicrosoft:mainfrom
nanokind:feature/allow-format-range-to-be-undefined

Conversation

@nanokind
Copy link
Contributor

It's a common case that we need to format the whole JSON document, but languageService.format didn't allow range to be undefined (Which is a valid usage defined in src/utils/format.ts)

This PR updates the format signature which allows the following usage to format the whole JSON document:

languageService.format(document, undefined, options)

@nanokind nanokind force-pushed the feature/allow-format-range-to-be-undefined branch from 0d704f3 to 4dd5970 Compare June 17, 2025 15:42
@aeschli aeschli enabled auto-merge (squash) June 30, 2025 17:15
@aeschli
Copy link
Collaborator

aeschli commented Jun 30, 2025

Thanks @fengzilong !

@vs-code-engineering vs-code-engineering bot added this to the July 2025 milestone Jun 30, 2025
@aeschli aeschli merged commit fccf79d into microsoft:main Jun 30, 2025
3 checks passed
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