zackad / prettier-plugin-twig

Code formatting plugin for Prettier to handle Twig templates
Apache License 2.0
54 stars 6 forks source link

Remove melody specific tags? #51

Closed rellafella closed 3 months ago

rellafella commented 3 months ago

Combing through the tests I have come across the "mount" tag. This seems to be melody specific and if this is to become a "Twig" focused plugin, it's probably best to remove the functionality for this.

rellafella commented 3 months ago

"use" is another statement that I believe is specific to Melody.

zackad commented 3 months ago

I don't think removing existing feature is a good idea. Especially if they don't hinder our core functionality. Although the focus of this project is to support twig template only, that doesn't necessarily means that we will reject patches extending this plugin capability.

What do you think about splitting funtionality into "core" that solely focus on twig template and "external" that add support for feature not exist in the twig project (craftcms, ux-twig-component)? I don't know the technical challenges if we try to implement this approach. Just some random though.

rellafella commented 3 months ago

I think that is a good approach, no need to remove. I certainly don't think it would be too hard to have some of this re-structured. I presume that all of the stuff in the melody directory is to be reviewed going forward though to essentially sit in a ./src/parser directory. At that point it would be sensible to split into core/extended.

This might be a good goal for a v2 release as it's not completely necessary for v1.

Happy to close for now.