Skip to content

noctud/intellij-latte

Repository files navigation

Latte for PhpStorm and IntelliJ IDEA

JetBrains Marketplace Build License: MIT Discord

Provides comprehensive support for the Latte templating engine in PhpStorm and IntelliJ IDEA. Includes syntax highlighting, code completion, type-aware references via {templateType}, navigation from {link} to presenter actions and {control} to components, live inspections, refactoring across Latte and PHP files, and configurable custom tags, filters, and functions per project.

If you have any problems with the plugin, create an issue or join the Noctud Discord.

Example

Notice

This plugin is a fork of the original free plugin. This fork has been created as another free plugin, since the code completion feature was removed from the original free plugin.

Installation

Settings → Plugins → Browse repositories → Find "Latte Support" → Install Plugin → Apply

Installation from .jar file

Download the instrumented.jar file from the latest release or the latest successful GitHub Actions build

Supported Features

  • Syntax highlighting and code completion for PHP in Latte files
  • Type-aware references to classes, methods, properties, and constants (via {templateType})
  • Link references between {link} macros and presenter action methods
  • Control component references from {control} tags to registered components
  • File path references and missing file detection in {include} and {import} macros
  • Refactoring support (rename classes, methods, variables across Latte and PHP)
  • Live inspections (undefined variables, unknown classes/methods, deprecated tags, modifier issues, iterable types)
  • Code folding, brace matching, and structure view
  • Configurable custom tags, filters, functions, and variables per project
  • Live templates for common Latte constructs
  • Support for {syntax off}, {syntax double}, and n:syntax attributes

Building

./gradlew build

Testing in sandbox IDE

./gradlew runIde