Closed vudzero closed 6 months ago
The HTML language server is intended for HTML. It can work for HTML templating languages, but there's no guarantee for it. We use beautifyjs as the underlying HTML formatter. You can try to file the issue there.
Thanks for your answer!
Would you happen to know why it does work in the beautifyjs playground but not un VSCode?
I see you are in a Razor
file. Is the editor language mode Razor
? You can see that in the status bar.
In my reply I assumed the editor was in HTML mode.
Out-of-the box, VS Code does not provide a formatter for Razor files. It comes from an extension. You have to file the issue against that extension. https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp is the extension that also covers Razor.
Hi,
Not sure if it's the right place but I have an issue with the html formatting of razor code. The html fortmatter does not seems to handle at signs (@) properly when used as a prefix of an attribute name.
What is expected
What I get after formatting
I'm using the
"html.format.wrapAttributes": "force-expand-multiline",
optionsI'm willing to investigate if someone can point me where to look at
Thanks!