mblode / mblode/vscode-twig-language-2

Add option to pad braces

Open
#6 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

formatter no-issue-activity pretty diff
Dominant language
JavaScript
Stars
62
Forks
33
PR merge metrics
No merged PRs in 30d

Description

When outputting twig variables, I prefer to have spaces before and after for readability. For example:

Dislike:

{{var}}

Like:

{{ var }}

I'd love if this plugin would automatically add the spaces for me if I enter it without any. Being able to turn this on/off with an option would probably be wise.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the extension's Twig formatting entry point and any existing formatter options. Trace how variable braces are emitted, then verify that an option controls spacing and that both the default and enabled behaviors match the issue's Twig examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.