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

[FEATURE] Better indentation for hash parameters on multiple lines #842

Open
2 tasks done
lukepass opened this issue Jul 2, 2024 · 1 comment
Open
2 tasks done

Comments

@lukepass
Copy link

lukepass commented Jul 2, 2024

Feature Request

I would like that hash parameters were better indented in Twig templates.

Now:

{{ form_start(form, {
                    attr: {
                    class: 'quiz',
                    'data-controller': 'ajax-form quiz',
                    'data-ajax-form-targets-value': ['#ajax-content-1', '#ajax-content-2', '#lesson-footer']|serialize('json') ,
'data-ajax-form-spinner-html-value': include('shared/_spinner.html.twig'),
'data-ajax-form-scroll-to-value': '#ajax-content-1',
}
}) }}

Desiderata:

{{ form_start(form, {
    attr: {
        class: 'quiz',
        'data-controller': 'ajax-form quiz',
        'data-ajax-form-targets-value': ['#ajax-content-1', '#ajax-content-2', '#lesson-footer']|serialize('json') ,
        'data-ajax-form-spinner-html-value': include('shared/_spinner.html.twig'),
        'data-ajax-form-scroll-to-value': '#ajax-content-1',
    }
}) }}

Thank you for the good project"

@asolopovas
Copy link

it hasn't been fixed for ever, the only tool that did good job was Phpstorm, I never been able to find a decent formatter for twig they all lack something, so Goodluck with this mate if you find solution let me know.

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