Skip to content

Comments

docs(vcode): add example for editor.formatOnSave with editor.formatOnSaveMode#18126

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-17-docs_vcode_add_example_for_editor.formatonsave_with_editor.formatonsavemode_
Jan 17, 2026
Merged

docs(vcode): add example for editor.formatOnSave with editor.formatOnSaveMode#18126
graphite-app[bot] merged 1 commit intomainfrom
01-17-docs_vcode_add_example_for_editor.formatonsave_with_editor.formatonsavemode_

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jan 17, 2026

VS Code can handle formatting on save in different ways. The configuration editor.formatOnSaveMode is responsible for it.
The default value "file" will format the whole file.
https://code.visualstudio.com/updates/v1_49#_only-format-modified-text

Other values like modifications are not supported by oxfmt for the moment, because the missing LSP specs:

Problem found in https://discord.com/channels/1079625926024900739/1461131443215405305/1461160171890938043

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-docs Category - Documentation. Related to user-facing or internal documentation labels Jan 17, 2026
Copy link
Member Author

Sysix commented Jan 17, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix force-pushed the 01-17-docs_vcode_add_example_for_editor.formatonsave_with_editor.formatonsavemode_ branch from e316f68 to b211bac Compare January 17, 2026 10:06
@Sysix Sysix marked this pull request as ready for review January 17, 2026 10:07
@Sysix Sysix requested a review from camc314 as a code owner January 17, 2026 10:07
Copilot AI review requested due to automatic review settings January 17, 2026 10:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation for VS Code's editor.formatOnSave and editor.formatOnSaveMode settings to help users properly configure automatic formatting with oxfmt. The change clarifies that oxfmt currently only supports formatting the entire file (not just modified lines) due to missing LSP specifications.

Changes:

  • Added editor.formatOnSave and editor.formatOnSaveMode configuration examples to the README
  • Included an inline comment explaining that oxfmt formats the whole file, not just modified lines

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Jan 17, 2026
Copy link
Member Author

Sysix commented Jan 17, 2026

Merge activity

…tOnSaveMode` (#18126)

VS Code can handle formatting on save in different ways. The configuration `editor.formatOnSaveMode` is responsible for it.
The default value "file" will format the whole file.
https://code.visualstudio.com/updates/v1_49#_only-format-modified-text

Other values like `modifications` are not supported by `oxfmt` for the moment, because the missing LSP specs:
- https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_rangeFormatting
- (or)  https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_onTypeFormatting

Problem found in https://discord.com/channels/1079625926024900739/1461131443215405305/1461160171890938043
@graphite-app graphite-app bot force-pushed the 01-17-docs_vcode_add_example_for_editor.formatonsave_with_editor.formatonsavemode_ branch from ead764c to d8f5c66 Compare January 17, 2026 10:20
@graphite-app graphite-app bot merged commit d8f5c66 into main Jan 17, 2026
20 checks passed
@graphite-app graphite-app bot deleted the 01-17-docs_vcode_add_example_for_editor.formatonsave_with_editor.formatonsavemode_ branch January 17, 2026 10:26
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant