Skip to content
PluginStats

Twig Language 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 · Dec 6, 2026

Twig Language has 239,628 recorded installs on VS Code Marketplace, an increase of 0.4% over the past 30 days, ranking #1353 of 2,515 tracked listings.

Installs
239,628
Official API · Dec 6, 2026
7-day growth
+0.1%
+181 installs
30-day growth
+0.4%
+918 installs
90-day growth
—
Insufficient history
Rank
#1353
▼ 4 in 7 days

Rating: 4.10 / 5 from 10 ratings

About Twig Language

<div align="center">

Twig Language

Syntax highlighting, 110 snippets, hover documentation, and Twig formatting for Twig templates

Twig Language keeps VS Code’s HTML language mode and IntelliSense for Twig files. It now uses the same formatter as Twig Language 2, which uses a separate twig language mode. Choose one extension for your workspace.

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

Install

ext install mblode.twig-language

Paste that into Quick Open (cmd+P), or search "Twig Language" in the Extensions panel.

Quickstart

Open a .twig file. Highlighting and hover apply straight away. Type a snippet prefix and press tab, so entries becomes:

{% for entry in craft.entries
	.section("news")
	.limit(10)
	.all()
%}
	<a href="{{ entry.url }}">{{ entry.title }}</a>
{% endfor %}

Snippets

110 of them, all in src/snippets/snippets.json:

  • Twig tags: if, for, block, embed, filter, macro, set, use, include, autoescape, verbatim, and every closing form.
  • Craft CMS queries: entries, assets, categories, tags, users, and feed, each with a loop body, plus cache, nav, paginate, switch, and redirect.
  • Forms: formlogin, formuserregistration, formuserprofile, formforgotpassword, formsetpassword, formsearch, and formsearchresults, each a complete Craft form.
  • Helpers: csrf, head, endbody, the craft.app.request getters, and the maths filters (ceil, floor, round, min, max, random, shuffle).

Snippets write Twig strings with double quotes, such as {% include "template" %}. Set twig-language.snippetQuotes to single for {% include 'template' %}; HTML attribute quotes stay double. Set twig-language.craftSnippets to false to hide the Craft CMS queries, forms, helpers and tags such as switch, nav and cache, and keep the plain Twig snippets. Craft snippets are marked "craft": true in the snippet file.

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.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.templateNamespaces, for example { "App": "src/App/templates" }. Names built at runtime, and names that do not match a file, have no definition.

Hover

Hold the cursor over Twig code to get its documentation: 33 filters, 15 functions, and 28 language constructs. Turn it off with twig-language.hover.

Add your project's own tests, filters and functions with twig-language.customTests, customFilters and customFunctions, for example { "numeric": "True when the value is numeric." }. They are offered as completions inside Twig tags and show their description on hover. Any name after is or is not is highlighted as a test.

MJML

MJML tags keep their names and nesting when formatted, and <mj-style> bodies are highlighted and formatted as CSS. .mjml.twig files open in this extension. To use it for plain .mjml files that contain Twig, add "files.associations": { "*.mjml": "html" }; this replaces the MJML extension's language mode for those files.

Formatting

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

"[html]": {
  "editor.defaultFormatter": "mblode.twig-language",
  "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 Output channel. Formatting runs in a cancellable worker with a 2 MiB document limit.

Configuration…

Description from the VS Code Marketplace listing.

  • beautify
  • craft
  • html
  • 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 installs on VS Code Marketplace, last 90 days: 239,628 installs as of Dec 6, 2026.Twig LanguageInstalls on VS Code Marketplace · Last 90 days239,628installs237.8K238K238.2K238.4K238.6K238.8K239K239.2K239.4K239.6K239.8KSep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6installsobservedarchived (Internet Archive)no observationsOct 16, 2026 – Dec 6, 2026 · 50 observations · Updated Dec…pluginstats.com
Twig Language installs on VS Code Marketplace, last 90 days: 239,628 installs as of Dec 6, 2026.

7/30/90-day growth

Twig Language installs growth on VS Code Marketplace: +0.1% over 7 days, +0.4% over 30 days, 90-day growth unavailable.Twig LanguageInstalls growth on VS Code Marketplace239,628installs now7-day growth+181 installs+0.1%30-day growth+918 installs+0.4%90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 6, 2026pluginstats.com
Twig Language installs growth on VS Code Marketplace: +0.1% over 7 days, +0.4% over 30 days, 90-day growth unavailable.

Ranking history

Twig Language VS Code Marketplace ranking history: currently #1353 (by installs).Twig LanguageVS Code Marketplace ranking · by installs · Last 90 days#1353current rank#1340#1342#1344#1346#1348#1350#1352#1354#1356Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 16, 2026 – Dec 6, 2026 · 50 observations · Updated Dec 6, 2026pluginstats.com
Twig Language VS Code Marketplace ranking history: currently #1353 (by installs).

Ratings over time

Twig Language ratings on VS Code Marketplace, last 90 days: 10 ratings as of Dec 6, 2026.Twig LanguageRatings on VS Code Marketplace · Last 90 days10ratings99.51010.511Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6ratingsobservedarchived (Internet Archive)no observationsOct 16, 2026 – Dec 6, 2026 · 50 observations · Updated Dec…pluginstats.com
Twig Language ratings on VS Code Marketplace, last 90 days: 10 ratings as of Dec 6, 2026.

Listing placement

All VS Code Marketplace2,515 listings · 126 pages · 1,258 shown · page 68, #17 (overall #1,357)
All VS Code Marketplace: every listing in installs order

Listing placement

Programming Languages795 listings · 40 pages · page 24, #8 (overall #468)
Programming Languages: every listing in installs order

Listing placement

Snippets490 listings · 25 pages · page 13, #14 (overall #254)
Snippets: every listing in installs order

Listing placement

Formatters284 listings · 15 pages · page 8, #18 (overall #158)
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 (50)
Recent installs observations for Twig Language
Date (UTC)InstallsChange vs. previous
239,628+13
239,615+21
239,594+29
239,565+61
239,504+13
239,491+31
239,460+13
239,447+33
239,414+19
239,395+45
239,350+38
239,312+13
239,299+38
239,261—

Similar VS Code Marketplace Programming Languages plugins

All 20 Twig Language 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. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.