We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the .vscode folder, provide some usefull Twig Snippets, using a .code-snippets file ("drupal_twig.code-snippets"):
{ "tpl_extend": { "scope": "twig", "prefix": "extend", "body": [ "{% extends \"$1$RELATIVE_FILEPATH\" %}", "$2" ], "description": "Add Twig tpl extend" }, "block_parent_content": { "scope": "twig", "prefix": "parent", "body": [ "{{ parent() }}", ], "description": "Add Twig Block parent contents" }, "get_specific_block_from_template": { "scope": "twig", "prefix": "block", "body": [ "{{ block('$1', '@drowl_base/$2.html.twig') }}", ], "description": "Add Twig Block parent contents" }, "twig_attach_library": { "scope": "twig", "prefix": "attach", "body": [ "{{ attach_library('drowl_base/$0') }}" ], "description": "Twig / Drupal Attach library" }, "twig_kint": { "scope": "twig", "prefix": "kint", "body": [ "{{ kint($0) }}" ], "description": "Twig / Drupal Kint Debug output" }, "twig_dsm": { "scope": "twig", "prefix": "dsm", "body": [ "{{ dsm($0) }}" ], "description": "Twig / Drupal DSM Debug output" }, "twig_spaceless": { "scope": "twig", "prefix": "space", "body": [ "{% apply spaceless %}$0{% endapply %}" ], "description": "Twig spaceless with apply (spaceless is deprecated)" }, "twig_translation_with_context": { "scope": "twig", "prefix": "|t", "body": [ "|t({}, {'context' : '$0'})" ], "description": "Twig Drupal Translation strings with context" }, "twig_real_content_module_filter": { "scope": "twig", "prefix": ["|real_content", "empty"], "body": [ "|real_content is not empty" ], "description": "Check Markup (string) for 'real' content (empty check, requires drupal/twig_real_content)." }, "twig_real_content_module_test": { "scope": "twig", "prefix": ["is real content", "is not empty"], "body": [ "is real_content" ], "description": "Check Markup (string) for 'real' content (empty check, requires drupal/twig_real_content)." }, }
The text was updated successfully, but these errors were encountered:
Alternatively check for a Drupal Twig plugin which handles this for us?
https://marketplace.visualstudio.com/items?itemName=nadim-vscode.twig-code-snippets looks good and relatively up to date in contrast to others. Lists Drupal support.
Sorry, something went wrong.
Related to #150: Add "nadim-vscode.twig-code-snippets" as an extension
ed2cfa8
Alright, I added the extension, @thomasfrobieter, please check, if it fulfills your desires.
thomasfrobieter
No branches or pull requests
In the .vscode folder, provide some usefull Twig Snippets, using a .code-snippets file ("drupal_twig.code-snippets"):
The text was updated successfully, but these errors were encountered: