You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello and thanks for releasing and maintaining this wonderful extension! πββοΈ
Summary
Extension fails to format .component.html files when VSCode's "editor.formatOnSaveMode": "modifications" is set.
Steps To Reproduce:
Set "editor.formatOnSaveMode": "modifications" in VSCode settings
Try to format using extension (on save or via command)
Expected result
path/to/file.component.html file should be formatted.
Actual result
Status bar shows Extension 'Prettier - Code Formatter' cannot format file path/to/file.component.html and file isn't formatted.
Additional information
Unsetting "editor.formatOnSaveMode": "modifications" in VSCode settings fixes the issue. I suspect that the interop between VSCode's edited ranges and prettier's range is broken. The extension should either implement it or state and fail explicitly if this feature isn't supported.
ntotten
added
help-wanted
Not something we plan on doing, but we will take a pull request.
and removed
help-wanted
Not something we plan on doing, but we will take a pull request.
labels
Apr 5, 2021
Hello and thanks for releasing and maintaining this wonderful extension! πββοΈ
Summary
Extension fails to format
.component.html
files when VSCode's"editor.formatOnSaveMode": "modifications"
is set.Steps To Reproduce:
"editor.formatOnSaveMode": "modifications"
in VSCode settingsExpected result
path/to/file.component.html
file should be formatted.Actual result
Status bar shows
Extension 'Prettier - Code Formatter' cannot format file path/to/file.component.html
and file isn't formatted.Additional information
Unsetting
"editor.formatOnSaveMode": "modifications"
in VSCode settings fixes the issue. I suspect that the interop between VSCode's edited ranges and prettier's range is broken. The extension should either implement it or state and fail explicitly if this feature isn't supported.VS Code Version:
Prettier Extension Version:
v5.8.0
OS and version:
Fedora
Linux hp 5.9.8-200.fc33.x86_64 #1 SMP Tue Nov 10 21:58:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Prettier Log Output
This is strange, cause the output doesn't show an error. Perhaps it is incorrect?
The text was updated successfully, but these errors were encountered: