https://github.com/bjansen/pebble-intellij
Pebble support for IntelliJ IDEA
https://github.com/bjansen/pebble-intellij
android-studio intellij intellij-plugin pebble-templates templating
Last synced: 17 days ago
JSON representation
Pebble support for IntelliJ IDEA
- Host: GitHub
- URL: https://github.com/bjansen/pebble-intellij
- Owner: bjansen
- License: mit
- Created: 2017-01-13T20:42:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-27T21:33:07.000Z (26 days ago)
- Last Synced: 2025-03-30T11:08:37.624Z (24 days ago)
- Topics: android-studio, intellij, intellij-plugin, pebble-templates, templating
- Language: Kotlin
- Homepage:
- Size: 1.38 MB
- Stars: 90
- Watchers: 4
- Forks: 8
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IntelliJ plugin for Pebble [](https://gitter.im/bjansen/pebble-intellij) [](https://github.com/bjansen/pebble-intellij/actions) [](https://plugins.jetbrains.com/plugin/9407-pebble) [](https://sonarcloud.io/dashboard?id=pebble-intellij)
This plugin provides support for the [Pebble templating engine](https://github.com/PebbleTemplates/pebble) in
IntelliJ IDEA 2017.3 and later.
![]()
## 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](https://github.com/PebbleTemplates/pebble/wiki/spring-integration)
* [more to come](https://github.com/bjansen/pebble-intellij/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3At-feature)1: *Custom operators are currently not supported*.
## Installation
This plugin is available in JetBrains' [plugin repository](https://plugins.jetbrains.com/idea/plugin/9407-pebble),
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:
This will enable features like syntax highlighting, code completion, navigation,
Emmet expansions etc.## 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:
`@pebvariable` hints can be easily added to templates via the `var` live template. They must
follow this syntax:{# @pebvariable name="" type="" #}
For code completion to work properly in the `type` attribute, your `.peb` files need to be placed
under a [content root](https://www.jetbrains.com/help/idea/content-roots.html) (e.g. `src/main/resources`).
Otherwise, classes defined in your own source files won't be suggested.## Nightly builds
Snapshot builds are available as part of the Actions CI:
* go to https://github.com/bjansen/pebble-intellij/actions
* click on the latest build
* scroll to the bottom of the page, under the `Artifacts` section click on `pebble-intellij-development`
* this will download a zip file that can be installed in your IDE using [Install plugin from disk](https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_disk)