Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 5 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T09:38:50.000Z (23 days ago)
- Last Synced: 2025-01-17T04:05:25.634Z (12 days ago)
- Topics: android-studio, intellij, intellij-plugin, pebble-templates, templating
- Language: Kotlin
- Homepage:
- Size: 1.33 MB
- Stars: 90
- Watchers: 5
- Forks: 8
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IntelliJ plugin for Pebble [![Gitter](https://badges.gitter.im/bjansen/pebble-intellij.svg)](https://gitter.im/bjansen/pebble-intellij) [![GitHub Actions](https://github.com/bjansen/pebble-intellij/workflows/Java%20CI/badge.svg?branch=master)](https://github.com/bjansen/pebble-intellij/actions) [![GitHub release](https://img.shields.io/github/release/bjansen/pebble-intellij.svg)](https://plugins.jetbrains.com/plugin/9407-pebble) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=pebble-intellij&metric=coverage)](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:![Template data languages settings](images/settings.png)
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:![Code completion](images/completion.png)
`@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)