Skip to content
moeteloPublic

About

Twig language support for VS Code and Neovim.

Topics

Resources

Stars

65 stars

Watchers

1 watching

Forks

Latest commit

 

History

387 Commits

Folders and files

Repository files navigation

Twiggy

VSCode Marketplace: Twiggy

This is a fork of kaermorchen/twig-language-server (Modern Twig).

Why Twiggy?

Twiggy is a real language server for Twig, not just a syntax highlighter.

Twiggy Twig Language 2 Twig
Language server (LSP) ✅ ❌ ❌
Autocomplete, framework-aware (Symfony, Craft CMS) ✅ ❌ ❌
Go to definition (variables, templates, blocks) ✅ ❌ ❌
Hovers & signature help ✅ hover only ❌
Inlay hints ✅ ❌ ❌
Diagnostics & formatting Twig-CS-Fixer PrettyDiff ❌
Syntax highlighting ✅ + semantic tokens ✅ ✅
Snippets ✅ ✅ ✅
Neovim / Sublime Text support ✅ ❌ ❌

Definition

Definition for variables Definition for templates and blocks

Completion

Completion

Tip

For better completion in Symfony or Craft CMS, configure twiggy.framework and follow the extension output (Twiggy Language Server).

Inlay hints

inlay hints

Setup

VS Code

  1. Open Command Palette (Ctrl+P), type ext install moetelo.twiggy and press Enter.
  2. For Symfony project, set twiggy.phpExecutable and twiggy.symfonyConsolePath in the VS Code settings.
  3. Check the extension output (Twiggy Language Server) for errors.

Submit new issue if you have any problems or the feature you want is missing.

Neovim

Please refer to this reply and the instructions from neovim/nvim-lspconfig.

Sublime Text

Follow instructions ready-to-use client implementation maintained by the community.

Development

  1. Install Bun.
  2. bun install in the project dir.
  3. Press F5 in VS Code to start debugging.

Monorepo

About

Twig language support for VS Code and Neovim.

Topics

Resources

Stars

65 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages