pulse00 / Twig-Eclipse-Plugin

Eclipse plugin for the twig templating language.
twig.dubture.com
MIT License
107 stars 24 forks source link

Code formated just unreadable :-/ #87

Closed hlorridi closed 8 years ago

hlorridi commented 9 years ago
    <div id="container">
        {% block content %}{% endblock content %}
    </div>
    {% endblock body %}
    {% block javascripts %} 
        {% javascripts
            '%kernel.root_dir%/../vendor/components/jquery/jquery.min.js'
            '%kernel.root_dir%/../vendor/twitter/bootstrap/js/dropdown.js'
            filter='uglifyjs2' %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
        {% endjavascripts %} 
    {% endblock javascripts %}

when I apply code format (ctrl+i or ctrl+maj+f)

<div id="container">{% block content %}{% endblock content %}</div>
    {% endblock body %} {% block javascripts %} {% javascripts
    '%kernel.root_dir%/../vendor/components/jquery/jquery.min.js'
    '%kernel.root_dir%/../vendor/twitter/bootstrap/js/dropdown.js'
    filter='uglifyjs2' %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
    {% endjavascripts %} {% endblock javascripts %}
neopsis commented 8 years ago

For my latest project, I had to move from PHPStorm (with great twig support) to Eclipse, found and installed this plugin. For me, the plugin is unusable due to lack of formatting option and in my opinion, it decreases significantly the value of the plugin.

I do not understand why the plugin formatting is based on PHP. For me, more reasonable would be the HTML formatting as the master.

zulus commented 8 years ago

Code formatter is now based on HTML. Still far from perfect but better than before.