mblode / vscode-twig-language-2

VS Code extension with snippets, syntax highlighting, hover, and formatting for Twig.
https://marketplace.visualstudio.com/items?itemName=mblode.twig-language-2
MIT License
60 stars 27 forks source link

Auto closing tags not working with Twig #97

Open NicolasBarse opened 1 year ago

NicolasBarse commented 1 year ago

I couldn't get the default setting "html.autoClosingTags": true to work with this extension. Is there a way to make it compatible with Twig? I think this feature is great and it's kind of breaking the workflow without it.

T1ckbase commented 11 months ago

Use this settings, The original one is wrong, it breaks the html syntax.

    "files.associations": {
        "*.twig": "html"
    },
    "emmet.includeLanguages": {
        "twig": "html"
    },
mrleblanc101 commented 10 months ago

@T1ckbase Well now you don't have any Twig syntax highlighting so why even use this package ? This is not the solution

RyanRoberts commented 10 months ago

Unless it's added to the extension (which I guess is unlikely), your best bet is to use the Auto Close Tag extension and in the settings add Twig to its supported languages.

Auto Rename Tag is also good in combination with this.