blade-parser-typescript icon indicating copy to clipboard operation
blade-parser-typescript copied to clipboard

Weird formatting on multiline code for blade directive attributes and Alpinejs attributes

Open clovis-mo opened this issue 1 year ago • 3 comments

Hi,

I have been using your extension for months now but I still run into this issue.

The indentation is wrong/weird for multiline code inside blade directive and alpinejs attributes. the formatting works fine for oneliners

I have attached a screenshot for visual reference. image

Also, Thanks for your work towards the extension. Really cool.

clovis-mo avatar Sep 22 '24 18:09 clovis-mo

Just thought I would also include my config files.

.blade.format.json image

.prettierrc image

clovis-mo avatar Sep 22 '24 18:09 clovis-mo

Update.

I managed to fix this issue by simply settings the "useTabs" option to false.

I guess there's a bug in the plugin affecting calculation of indentations when "useTabs" option is true instead of spaces.

Cheers.

clovis-mo avatar Oct 04 '24 19:10 clovis-mo

Ah that makes a lot of sense! Thanks for the extra info (the tab support is pretty flaky at the moment and needs an overhaul 😅)

JohnathonKoster avatar Oct 04 '24 19:10 JohnathonKoster