redhat-developer / redhat-developer/vscode-xml

editor.formatOnSaveMode option is not respected

Open
#992 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug formatting
Dominant language
TypeScript
Stars
328
Forks
101
Avg merge
1d 17h
Merged PRs (30d)
7

Description

Hello,

firstly, thanks for your great extension and the efforts you put into it, I found the new formatter efficient and easy to use and configure. I have a request though regarding the option editor.formatOnSave. In my team, we configure it to modifications only to ease our code reviews, but the extensions seems to modify the whole file. Is it a side effect, have I missed a setting or is it planned for a future release ?
This is my vscode configuration:

Version: 1.87.2
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.22621

XML extension: 0.26.1

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code 1.87.2 with editor.formatOnSave set to modifications and the XML extension version 0.26.1. Trace the extension's format-on-save entry point and compare its behavior with VS Code's setting; done means only modified sections are formatted in modifications mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.