Skip to content

feat: allow format range to be undefined #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fengzilong
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)

@fengzilong fengzilong force-pushed the feature/allow-format-range-to-be-undefined branch from 0d704f3 to 4dd5970 Compare June 17, 2025 15:42
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.

1 participant