Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
clovis-mo opened this issue Sep 22, 2024 · 3 comments
Assignees

Comments

@clovis-mo
Copy link

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
Copy link
Author

Just thought I would also include my config files.

.blade.format.json
image

.prettierrc
image

@JohnathonKoster JohnathonKoster self-assigned this Sep 22, 2024
@clovis-mo
Copy link
Author

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.

@JohnathonKoster
Copy link
Contributor

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 😅)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants