Closed deathaxe closed 7 months ago
I think this makes sense, especially seeing how Php is the only syntax I know of even outside of the default packages that uses it and the ASP package already does it differently. However, we should get the upstream Php base scope to change first as a form of acknowledgement of this guideline. Afaik, Jon himself proposed the usage of embedding
, so hearing his opinion on this suggestion would be helpful.
An issue to discuss it is opened at https://github.com/sublimehq/Packages/issues/2687
Thanks. There seems to be some support on the issue, but let's wait a bit for more until we go forward with #7.
FYI, there is an open PR to remove the embedding
scope for the PHP synta at https://github.com/sublimehq/Packages/pull/2789, but it's currenlty on-hold because it's a significant change, I believe.
Via https://github.com/sublimehq/Packages/issues/2687#issuecomment-1141242678, @deathaxe concluded that changing the base scope of Php wouldn't be worth breaking a lot of setups and the proposal was ultimately rejected (or retracted).
However, I still agree that the embedding
scope should not actually be a part of the guideline and instead be mentioned as the sole exception along with a comment on how it would have been done instead if backwards-compatibility wasn't a concern, e.g. for new syntax definitions.
Remove
embedding
base scopeReasons:
PHP is the only Default Syntax which uses
embedding.php
as top-level scope.PHP should better use
text.html.php
as it is more likely a dialect or templating extension of text.html.basicThis is what ASP package does. It uses
text.html.asp
as top-level scope to denote the mix of html and basic syntax.The current description expresses exactly the opposite of how this scope is used by PHP.