I spent a lot time for investigate that problem.
In some way prettier formats all page but not allow to use format:modifications. I have set up git to project, also format on save when format:file works well as i need. I didn't found explanation or any detail if it's a near feature or not( maybe i blind).
So i looking for solution with format only newly edited code and not all file.
adding settings JSON( user settings)
{
"workbench.colorTheme": "Default Dark Modern",
"salesforcedx-vscode-apex.java.home": "C:\\\\Program Files\\\\Zulu\\\\zulu-17",
"git.autofetch": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
defaultSettings.json has
"editor.formatOnSaveMode": "file"
So maybe somebody has experience with different "Prettiers" which accomplish this requirement
I have tried to use different types of formatOnSave modes, reinstall Prettier, npm, etc. Nothing, and only format on save file is working