Since this is embedded in HTML (as I understand), you probably want to name the scope something like “text.html.ee” -- that way, all snippets/commands etc. which have their scope set to “text.html” will also work when in EE files.
fileTypes = ( "html", "htm", "php" );
foldingStartMarker = "\\{(exp:([a-zA-Z0-9:]+)|if)\\b.*?\\}";
foldingStopMarker = "\\{/(exp:([a-zA-Z0-9:]+)|if)\\}";
patterns = (
{ name = "constant.tag.ee";
begin = "\\{/?([-a-zA-Z0-9_:]+)";
end = "\\}";
captures = { 1 = { name = "entity.name.tag.html"; }; };
patterns = (
[...]
{ name = "string.single-quoted.ee";
begin = "'";
end = "'";
},
Here you add:
{ include = "text.html.basic"; },
);
}
);
}