Skip to content
PluginStats

Twig Language 2 installs statistics

By mblode (3 listings) · VS Code Marketplace · Programming Languages

Snippets, Syntax Highlighting, Hover, and Formatting for Twig

View on VS Code Marketplace Fresh · Oct 20, 2026

Twig Language 2 has 694,770 recorded installs on VS Code Marketplace, ranking #690 of 2,501 tracked listings.

Installs
694,770
Official API · Oct 20, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#690
Among tracked VS Code Marketplace listings

Rating: 3.41 / 5 from 22 ratings

About Twig Language 2

<div align="center">

Twig Language 2

Syntax highlighting, snippets, hover hints, and Twig formatting for Twig templates in VS Code

Open a .twig file and get highlighting, 113 Twig and Craft CMS snippets, and a formatter for the whole document or a selection.

<p align="center"> <a href="https://marketplace.visualstudio.com/items?itemName=mblode.twig-language-2"> <img src="https://vsmarketplacebadges.dev/version-short/mblode.twig-language-2.svg?style=flat&colorA=000000&colorB=000000" /> </a> <a href="https://github.com/mblode/vscode-twig-language-2/blob/master/LICENSE.md"> <img src="https://img.shields.io/github/license/mblode/vscode-twig-language-2?style=flat&colorA=000000&colorB=000000" /> </a> </p> </div>

Install

Search for Twig Language 2 in the VS Code extensions view, or run this in the Quick Open bar (Cmd+P):

ext install mblode.twig-language-2

Quickstart

Open any .twig or .html.twig file. The language activates on its own and both .twig and .html.twig are already associated with it.

Type a snippet prefix and press Tab:

{# type "ife" then Tab #}
{% if condition %}
	{# body #}
{% else %}
	{# body #}
{% endif %}

Then run Format Document (Shift+Alt+F). Formatting also works on a selection through Format Selection. JSON, CSS, SCSS, JavaScript, and TypeScript inside a template are highlighted as themselves.

Snippets

113 prefixes, covering plain Twig and Craft CMS. A sample of what each expands to:

PrefixExpands to
if, ife{% if %}, with an {% else %} branch
for, fore{% for item in items %}, with an {% else %} branch
block, extends, inc, embedtemplate inheritance and includes
set, macro, filter, verbatimthe matching Twig tag pair
entries, assets, categories, usersa craft.* query loop
cache, nav, paginate, switch, redirectCraft CMS tags
formlogin, formuserregistration, formsearcha complete Craft form, CSRF token included

Hovering a Twig tag, filter, or function shows what it does. src/snippets/snippets.json is the full list; entries marked "craft": true are Craft CMS snippets.

Snippets write Twig strings with double quotes, such as {% include "template" %}. Set twig-language-2.snippetQuotes to single for {% include 'template' %}; HTML attribute quotes stay double. Set twig-language-2.craftSnippets to false to hide the Craft CMS snippets (switch, nav, cache, entries, the Craft forms and helpers) and keep the plain Twig ones.

Project-specific tests, filters and functions from your own Twig extensions can be added for completion and hover. Any name after is or is not is highlighted as a test.

"twig-language-2.customTests": { "numeric": "True when the value is numeric." }

Go to template

Ctrl/Cmd-click, Go to Definition (F12) or Peek Definition on a template name opens it. This works for include, extends, embed, import, from and use tags, include() and source() calls, and arrays of names. Names resolve against twig-language-2.templatePaths in the workspace folder (templates, views, src/templates, then the folder itself), then the current file's folder. Names without an extension also try .twig, .html.twig, .html and index files, as in Craft. @Namespace/ names use twig-language-2.templateNamespaces:

"twig-language-2.templateNamespaces": { "App": "src/App/templates" }

Names built at runtime, and names that do not match a file, have no definition.

Formatting

Version 0.11 replaces PrettyDiff with a formatter built for Twig and HTML. Run Format Document, Format Selection, or enable format on save:

"[twig]": {
  "editor.defaultFormatter": "mblode.twig-language-2",
  "editor.formatOnSave": true,
  "editor.insertSpaces": true,
  "editor.tabSize": 2
}

Twig expressions are recognized before HTML attributes, so comparisons and nested quotes stay intact. Formatting preserves attribute case and order, inline text boundaries, string contents, comments, whitespace trim markers, and raw/verbatim/pre/textarea bodies. HTML and Twig nesting are tracked separately to support conditional HTML wrappers. Selection formatting uses the surrounding document's indentation and edits only complete selected lines.

JavaScript and CSS in script/style elements use bundled Prettier when safely parseable. Twig-generated code that cannot be parsed independently, custom js/css/scss blocks, data scripts, and multiline Twig expressions stay unchanged. No PHP, Rust, project dependencies, or Prettier configuration is required. Workspace Prettier plugins and Tailwind class sorting are not loaded.

Existing line breaks and blank lines are retained; inline elements and text are not expanded or reflowed. Leading line indentation can change rendered whitespace, especially with CSS white-space rules or captured template output. Keep exact-whitespace sections inside an ignore region:

{# twig-ignore-start #}
  content to keep exactly as written
{# twig-ignore-end #}

HTML comment markers and paired prettier-ignore-start/end and legacy parse-ignore-start/end markers also work. Unclosed tokens return no edits and a short status message, with details in the Twig Language 2 Output channel. Formatting runs in a cancellable worker with a 2 MiB document limit.

Configuration

Settings apply immediately and support workspace, folder, and [twig] overrides.…

Description from the VS Code Marketplace listing.

  • beautify
  • craft
  • HTMLTwig
  • php
  • snippets
  • twig

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

Twig Language 2 installs on VS Code Marketplace, last 90 days: 694,770 installs as of Oct 20, 2026.Twig Language 2Installs on VS Code Marketplace · Last 90 days694,770installs694.2K694.3K694.4K694.5K694.6K694.7K694.8KJul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20installsobservedarchived (Internet Archive)no observationsOct 16, 2026 – Oct 20, 2026 · 5 observations · Updated Oct…pluginstats.com
Twig Language 2 installs on VS Code Marketplace, last 90 days: 694,770 installs as of Oct 20, 2026.

7/30/90-day growth

Twig Language 2 installs growth on VS Code Marketplace: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.Twig Language 2Installs growth on VS Code Marketplace694,770installs now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 20, 2026pluginstats.com
Twig Language 2 installs growth on VS Code Marketplace: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

Twig Language 2 VS Code Marketplace ranking history: currently #690 (by installs).Twig Language 2VS Code Marketplace ranking · by installs · Last 90 days#690current rank#688#689#690#691#692Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 16, 2026 – Oct 20, 2026 · 5 observations · Updated Oct 20, 2026pluginstats.com
Twig Language 2 VS Code Marketplace ranking history: currently #690 (by installs).

Ratings over time

Twig Language 2 ratings on VS Code Marketplace, last 90 days: 22 ratings as of Oct 20, 2026.Twig Language 2Ratings on VS Code Marketplace · Last 90 days22ratings19202122232425Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20ratingsobservedarchived (Internet Archive)no observationsOct 16, 2026 – Oct 20, 2026 · 5 observations · Updated Oct…pluginstats.com
Twig Language 2 ratings on VS Code Marketplace, last 90 days: 22 ratings as of Oct 20, 2026.

Listing placement

All VS Code Marketplace2,501 listings · 126 pages · 1,252 shown · page 35, #10 (overall #690)
All VS Code Marketplace: every listing in installs order

Listing placement

Programming Languages792 listings · 40 pages · page 14, #1 (overall #261)
Programming Languages: every listing in installs order

Listing placement

Snippets489 listings · 25 pages · page 7, #8 (overall #128)
Snippets: every listing in installs order

Listing placement

Formatters286 listings · 15 pages · page 5, #15 (overall #95)
Formatters: every listing in installs order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Installs on a linear scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (5)
Recent installs observations for Twig Language 2
Date (UTC)InstallsChange vs. previous
694,770+216
694,554+148
694,4060
694,406+170
694,236—

Similar VS Code Marketplace Programming Languages plugins

All 20 Twig Language 2 alternatives

Data source

Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.

Listing: https://marketplace.visualstudio.com/items?itemName=mblode.twig-language-2. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.