How can I turn off "expression expected" errors in HTML files?

Any PHPStorm users know how to turn off this warning “expression expected” when a colon is found in an injected language (Antlers in my case)?  The filetype is HTML, but many of the tags we use for our CMS have colons in them such as you see below.

How can I disable all these?

0
4 comments

Such errors come from lexer, and the only way to get rid of them is disabling syntax highlighting for the file - or deleting the injection. BTW, how did yoiu manage to inject antlers template in HTML? PhpStorm doesn't provide any support for this language, and i'm not aware of any plugins for it...

0
Avatar
Permanently deleted user

I wish there was an Antlers plugin for Statamic/PHPStorm.  We really need one.  

I did not really inject it.  I just opened the HTML file with the Antlers tags in it, disabled all project inspections other than HTML, SCSS and it is a lot better.

I tried disabling with Hector per project but I lose the autocomplete for classes which I really want. Any way to disable for all HTML files or is per file or project only way?

There is a Sublime Text Text Mate bundle I can use, but then I lose all HTML formatting. When Statamic 3 comes out it will have it's own new file extension which will make this easier as it will no longer need .HTML.

For now, what do you think is best way to handle this?

0

but you definitely do have some language injected in your HTML, otherwise your Antlers tags would appear as simple text...

>Any way to disable for all HTML files or is per file or project only way?

No; highlighting can only be disabled per file

0
Avatar
Permanently deleted user

Well until we get an Antlers language plugin I will have to disable per file so that the autocomplete keeps working.  Thanks for the help.

0

Please sign in to leave a comment.