prettier-standard-vscode
prettier-standard-vscode copied to clipboard
Not overwriting vscode's default beautifier on install
No functionality from prettier-standard extension seems to be available to me when installing and ensuring its enabled. Checked in keyboard shortcut settings of vscode preferences, and the Format Document command is still a 'Default' source (assuming this should be different). In any case, using format document on any file results with the default vscode formatting. Seems to be an issue when using standard as a local dependency as well as this vs plugin.
@Towli I just came across this as well. If you downgrade your standard local dependency to v10 (which is what prettier-standard-vscode
has a dependency, then it works properly. Looks like there is a breaking change in standard v11 that this plugin does not like.
Ah, so that may not have entirely been the issue. I opened up the vs code dev tools, and could see a console log message saying that 'format on save' took too long and was aborted. After that, it started reverting back to the default formatter and I had to restart vscode for it to come back to life. I increased the editor.formatOnSaveTimeout
from 750ms to 2000ms and its working better now.
Ok after much deliberation I found the actual issue - I had a code beautify extension installed that updated and added its own format on save hook. This would start randomly taking priority over prettier, which is what caused the issue. Disabling this other extension fixed everything for real.