smokeelow / pebble-intellij

Pebble support for IntelliJ-based IDEs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IntelliJ plugin for Pebble Gitter Travis CI GitHub release

This plugin provides support for the Pebble templating engine in IntelliJ-based IDEs, including IntelliJ IDEA Community Edition. It supports the IntelliJ platform version 143.x (IntelliJ IDEA 15, AppCode 3.3, CLion 1.2, DataGrip 1.0, PhpStorm 10, PyCharm 5, RubyMine 8, WebStorm 11) and later.

IntelliJ plugin for Pebble

Features

  • parser/lexer1 and syntax highlighter (supports custom delimiters)
  • live templates for built-in tags
  • braces matching, code folding and commenting
  • quote handler
  • navigation (methods and fields, included files)
  • code completion
  • highlight unknown references
  • support for variables and functions introduced by pebble-spring
  • more to come

1: Custom operators are currently not supported.

Installation

This plugin is available in JetBrains' plugin repository, from your IDE go to Preferences > Plugins and enter pebble in the search bar.

Mixing Pebble and other languages

To make the editor recognize two languages in the same file, for example HTML and Pebble, go to Preferences > Languages & Frameworks > Template Data Languages and select the HTML data language on the directory that contains your Pebble templates:

Template data languages settings

Using code completion

In order to use code completion, you will have to let the plugin know what the type of foo is. This can be done using @pebvariable hints, much like in the JSP, FreeMarker and Velocity plugins:

Code completion

@pebvariable hints can be easily added to templates via the var live template. They must follow this syntax:

{# @pebvariable name="<name>" type="<type>" #}

About

Pebble support for IntelliJ-based IDEs

License:MIT License


Languages

Language:Kotlin 85.6%Language:Java 10.1%Language:ANTLR 4.1%Language:HTML 0.2%