Closed transtone closed 7 years ago
If you can fix broken thign caalled js-beautify I'll buy you a beer. The defualt setting doesn't work. I tried all possible combination of the settings I can imagine it still doesn't work. For the sake of sanity if there is one more js-beautify related issue I'll remove it immediately.
vscode's html tool not have this bug: https://github.com/Microsoft/vscode-html-languageservice/blob/master/src/services/htmlFormatter.ts
In neither html nor vue can I reproduce this problem. You can set "vetur.format.defaultFormatter.html": "none"
@octref This is caused by rewrapping code in indentation.
https://github.com/vuejs/vetur/blob/master/server/src/modes/template/services/htmlFormat.ts#L16
js-beautify won't deindent code in comment. So effectively it reindent.
Sadly I don't have time to fix this. :/
js-beautify won't deindent code in comment.
Yeah, but it indents the first line of comment, and not the rest, which I think is not reasonable as a beautifier. It should either leave all comments alone or indent all comments together.
@HerringtonDarkholme @octref
In neither html nor vue can I reproduce this problem.
Do you set "editor.formatOnType": true
?
I clear all vscode settings,
just install vetur
,
and set "editor.formatOnType": true
,
open a abc.vue
file
press meta-s
continuouly
this is what happened:
@HerringtonDarkholme can you reproduce this problem?
I can reproduce but I will not fix this.
It fixed in vetur-0.11.3, thanks!
=====
Info
Problem
when save comment in , the code auto add 4 whitespace in all comment line everytime.
Reproducible Case
use
html
for .vue files works fine. butvue
for .vue files got this problem.I kown it must js-beautify's problem, but I can't find a issue about this, and vscode's html(use js-beautify?) works fine. Is there any template formatter tools to replace js-beautify-html?