Comments (8)
Due to my frustration with JSP at work, I've written jte during lockdown - a small template engine that has pretty much full IntelliJ support for code suggestions, refactorings and highlighting. The language takes a very similar approach as Rocker does, so the jte IntelliJ plugin might be a blueprint for a Rocker IntelliJ plugin.
In case you're curious, here is a gif showing the plugin in action:
The key part of the plugin is org.jusecase.jte.intellij.language.JteJavaLanguageInjector
extending com.intellij.lang.injection.MultiHostInjector
, which basically injects the various Java parts of the template in a Java class that IntelliJ understands.
from rocker.
@tipsy @bjornbak We're trying to gauge interest in an IDE plugin for rocker templates (that would include code completion). If interested please take a few seconds to fill out this survey: https://www.surveymonkey.com/r/VKXYG8P
from rocker.
@bjornbak IDE support would obviously be amazing -- but not exactly a trivial problem. The project is relatively new so no IDE support at the moment. If you wanted to give intellij a stab, I'd say go for it! The compiler generates a very usable Model object you could build a template engine with.
from rocker.
Any update on this? The engine looks very promising, but no IntelliJ-plugin is unfortunate.
from rocker.
from rocker.
We need to push in Spring Boot direction #66
If Rocker will be popular, it will be by default in Spring Boot, so Jetbrains itself will make a plugin.
from rocker.
I have been trying to whip up something to provide syntax highlighting for rocker in intellij but I'm clearly out of my league. I've tried using https://github.com/antlr/antlr4-intellij-adaptor/ and came up with this:
I'm sure someone with a basic understanding of how antlr works (not my case) would get to something actually usable in a few hours/days.
The implementation can probably be heavily inspired by pebble's plugin: https://github.com/bjansen/pebble-intellij
Source: https://github.com/bendem/rocker-intellij-plugin
from rocker.
@bendem nice , i like rocker but no idea support ,
from rocker.
Related Issues (20)
- Document required template extensions
- GraalVM compatibility HOT 4
- Warnings in Gradle Plugin (@Input annotation used on property of type 'File') HOT 6
- call java function in template HOT 1
- rocker-maven-plugin templateDirectory
- With block invalid: multiple equals symbols found for assignment String href = "/abc?x=y"
- [Doc] it's unclear how to instantiate Rocker
- Loading templates from classpath / jar ? HOT 1
- Parentheses right after variable HOT 2
- Compile time include postprocessor
- support Java 11 HOT 1
- Github latest release points to outdated release.
- Unable to get hot-reload working with tomcat server HOT 3
- Question about formatting
- Generation crashes with NPE if a non-normal file is present in the template directory HOT 1
- Global default null value rendering to avoid NPEs
- it's abandoned? HOT 1
- How to configure Rocker to use GuavaHtmlStringify? HOT 4
- Support Java 17 HOT 2
- Why rocker dont import List class? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocker.