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

Disable Craft CMS snippets #19

Open grig0ry opened 5 years ago

grig0ry commented 5 years ago

It would be nice to add an Disable Craft CMS snippets option.

ericmorand commented 5 years ago

Yes, it would be great if this extension was not opinionated.

mblode commented 5 years ago

Hey @ericmorand, I 100% understand that it is called "Twig language" and therefore should be less specific to Craft or Symfony for example. Would you envision that I should remove the convenience features of having Craft specific snippets from the extensions or should there be a "craftSnippets" configuration in the settings to disable these features?

Looking through the VS Code documentation and the roadblock I hit was that the way to include snippets is relatively unconfigurable and the alternative is needlessly complex. Here is the current way to include snippets where I'm unable to enable/disable with settings:

"snippets": [
            {
                "language": "twig",
                "path": "./src/snippets/snippets.json"
            }
],

Let me know your thoughts