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
This commit (d7202e3) appears to have broken the Format Document command (probably all document formatting) when using custom extensions for Vue files.
In volar 1.0.16, our project that uses custom file extensions works fine with the format document command. After upgrading to the latest version (1.0.18) I noticed it no longer was formatting the documents when requested. After digging through the commits one by one this specific commit seems to be where it broke.
I looked through the changes in that commit and I don't see anything that should be causing this problem. But I have tried going back and forth between those two commits a couple times and it always works on the commit before but not on the commit mentioned above.
I'll keep poking around, but wanted to get it on the board since it was a recent change. If you have any specific ideas on researching this further I'd be happy to dig deeper.
Steps to reproduce:
Check out the repository at the commit just PRIOR to the one mentioned above.
Run "pnpm i" followed by "pnpm run build"
Open repo in VS Code and run it.
Add "obs" to volar.vueserver.additionalExtensions configuration setting.
Add "src/**/*.obs" to tsconfig includes.
Add "*.obs" -> "vue" to files.associations configuration setting.
Rename "HelloWorld.vue" to "HelloWorld.obs".
Open the Volar-Starter repo in the development environment VS Code.
Make a change to the file that would be fixed by formatting (such as additional space between the "import" keyword and the opening brace).
Activate the VS Code command "Format Document" and see that the spacing is correctly fixed.
THEN update repo to the next commit - that is the one mentioned above.
Remove node_modules and run "pnpmi" and "pnpm run build".
Open repo in VS Code again and run it.
Make the same change to the "HelloWorld.obs" file.
Activate the VS Code command "Format Document" and see that nothing happens.
(Edit: Fixed link to commit to be in the main repo instead of my forked repo)
The text was updated successfully, but these errors were encountered:
The problem is that vueCompilerOptions.extensions incorrect in syntax server, but before d7202e3 all document names all is untitled + document language, so the vueCompilerOptions.extensions is just getting ignored.