docs(vcode): add example for editor.formatOnSave with editor.formatOnSaveMode#18126
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
e316f68 to
b211bac
Compare
There was a problem hiding this comment.
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.formatOnSaveandeditor.formatOnSaveModeconfiguration 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.
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
ead764c to
d8f5c66
Compare

VS Code can handle formatting on save in different ways. The configuration
editor.formatOnSaveModeis 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
modificationsare not supported byoxfmtfor the moment, because the missing LSP specs:Problem found in https://discord.com/channels/1079625926024900739/1461131443215405305/1461160171890938043