dprint-vscode
dprint-vscode copied to clipboard
The formatter stopped formatting files when saving
VSCode:
Version: 1.87.2 (user setup)
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.22000
Plugin version:
Name: Dprint Code Formatter
Id: dprint.dprint
Description: Formats code in VSCode using dprint.
Version: 0.16.0
Publisher: dprint
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dprint.dprint
The problem is observed only in the latest version of the editor on operating systems Windows and MacOS.
I haven't had any issues on mac, windows, or linux. Can you provide a reproduction and also can you double check your vscode user and workspace settings are configured to format with dprint? Also, maybe set the vscode setting: "dprint.verbose": true
then in vscode select "View > output" then select "dprint" in the drop down to see what it's logging.
Also, what happens if you use the command pallete to manually do "Format document with..." and select "dprint"?
I've found a similar situation but only when the setting editor.formatOnSaveMode
is anything other than file
.
If it is set to another option (modifications
or modificationsIfAvailable
) dprint will not format the file on save, but triggering the command to format the file will work.