mblode / vscode-twig-language

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

HTML Autocomplete Not Working #4

Closed bgarrant closed 6 years ago

bgarrant commented 6 years ago

Can you add the setting so the HTML Autocomplete/Intellesense works when using .twig or .html? I thought there was a user setting for it, but it appears it is in the extension. Just start typing <div and you should get the Intellesense pop up. It is not working when twig syntax is used. If you look at the Twig Pack extension it does work in that one somehow. Not sure that is best example but you get that idea.

bgarrant commented 6 years ago

All HTML functions including Autocomplete/Intellesense should work within Twig as well. That is how PHPStorm and Atom works.

bgarrant commented 6 years ago

Somehow this old extension kind of had it working https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-twig-pack

bgarrant commented 6 years ago

https://github.com/Microsoft/vscode/issues/670

mblode commented 6 years ago

I will release a working version later tonight! Get excited!!

mblode commented 6 years ago

Just to clarify, do you also want formatting of twig to work in .html files?

bgarrant commented 6 years ago

We need the HTML Autocomplete to work along with Twig. I think the way that older extension did it is made use of the .html extension so that Twig and HTML Autocomplete would both work.

bgarrant commented 6 years ago

So if you type <div you should see the Autocomplete/Intellesense wrench icon in the suggestions. All I get is the word based ABC one

bgarrant commented 6 years ago

Great work on all this by the way Matt

bgarrant commented 6 years ago

I think VSC has to believe that .html and .twig both are HTML syntax. Then it can be tricked so Autocomplete works. Somehow they did it with https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-twig-pack. If you open a .html or .twig file it says syntax HTML in corner

bgarrant commented 6 years ago

Maybe that is how they had it working

bgarrant commented 6 years ago

The formatting, coloring, everything should work same in .html and .twig ideally. Hopefully that helps.

Arnauw commented 3 years ago

It's 2021 and I have the same issue, even after adding every twig extensions I found

iamfrankeu commented 3 years ago

@Arnauw I'm also still looking forward for a fix...

buba71 commented 3 years ago

Me too...

ghost commented 3 years ago

Had the same issue and found this on details for Twig Language 2 extension. Make sure you install Twig language too and follow the below

This extension does not have HTML Intellisense. If you need HTML Intellisense (which can be quite useful), please download my other Twig Language extension: https://github.com/mblode/vscode-twig-language.

Add the below into your settings and it works a treat

"files.associations": {
    "*.html": "twig"
},
"emmet.includeLanguages": {
    "twig": "html"
},
buba71 commented 3 years ago

It's work for me. Great!! Thanks @nhurst-knight

Marvelxy commented 3 years ago

Works for me too.

Taolana commented 2 years ago

Thanks, it works.

AmineGroot commented 2 years ago

I have been looking for this solution for too long , Thanks A Lot !

LuigiVampa21 commented 1 year ago

Thank you !!!

tsawitzki commented 1 year ago

Still experiencing this to be not working with the latest version in March 2023. Set interpreter to "HTML (Twig" -> All autocompleting for HTML tags gone