Skip to content

Doesn't respect print-width? #86

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

Closed
SimonBrazell opened this issue May 19, 2023 · 2 comments
Closed

Doesn't respect print-width? #86

SimonBrazell opened this issue May 19, 2023 · 2 comments

Comments

@SimonBrazell
Copy link

SimonBrazell commented May 19, 2023

Hello, trying to get this set up with an existing project, using vscode and prettier + ruby plugin. Most things appear to be working fine except for printWidth on HAML files, I can't get the formatter to respect the printWidth setting I have in the .prettierrc.json file. The HAML parser will turn perfectly valid HAML which is breaking ruby method calls at the comma over multiple lines into one very long line. Is this expected behaviour or am I doing something wrong?

@SimonBrazell
Copy link
Author

I tried running this from the CLI and got the same results -
stree format --print-width=120 --plugins=haml template.haml

@SimonBrazell SimonBrazell changed the title Does respect print-width? Doesn't respect print-width? May 19, 2023
@kddnewton
Copy link
Member

This is unfortunately by design. HAML can't be split into multiple lines in the same way as Ruby, it's only allowed to have one level of indentation. Because of this we have #4 open.

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