laravel-blade-snippets-vscode
laravel-blade-snippets-vscode copied to clipboard
Formatting removes all indentation
I have event tried this on a clean install of Ubuntu on a virtual machine with only vs code with this extension. As soon as I format the document it removes all indentation.
Before formatting: https://prnt.sc/py5gut
After formatting https://prnt.sc/py5h0h
Thanks! :)
Yeah this is something I've been ignoring but as I get more and more nested blade directives in a page I'd want to see them indented. A good example where this makes it completely unscannable is for, break, continue loops...
@section('content')
@for(range(0,10) as $n)
@if($n === 0)
<div>
Header
</div>
@continue
@endif
@unless($n > 9)
<div>
{{ $n }}
</div>
@break
@endunless
@endfor
@endsection
Gets turns into
@section('content')
@for(range(0,10) as $n)
@if($n === 0)
<div>
Header
</div>
@continue
@endif
@unless($n > 9)
<div>
{{ $n }}
</div>
@break
@endunless
@endfor
@endsection
This is a dupe of this issue here. https://github.com/onecentlin/laravel-blade-snippets-vscode/issues/92
Same for me, exist othe blade formatter to vs code? i can't find one :(
also discussed before in #61 An alternative, I found a hack for the Beautify extension made by someone, and posted it as an answer here: https://stackoverflow.com/a/60713478/1925358 Maybe that could be leveraged to improve this extension and provide blade directive indentation.
Any more updates with this? I really just want to use this plugin and not involve beautify.
Its too annoying -_-
still unusable because of this issue in 2022