Jetbrains language plugins: Nunjucks & Liquid
In June, I saw a market opportunity to build a plugin for Jetbrains editors like Webstorm and IntelliJ for the Nunjucks templating language.
I created a first version of a Nunjucks syntax plugin and posted it on Jetbrains Marketplace. I mostly made it for my own needs but thought it would be good to post it online. A few weeks later I saw it was downloaded over 200 times, and that made me think.
After some initial market research, I concluded that a) the official Nunjucks plugins was severely outdated and b) The main competition was charging $5+/month for a syntax plugin, and I didn't love that subscription type approach, especially for the subject matter of a syntax highlighting plugin.
This led me to taking a stab at improving the plugin. I got to a good result, started using it myself, and then made it commercially available for a one-time $12 fee, and created the marketing site.
In July, I followed up with a plugin for Liquid’s templating language. Liquid’s plugin is particularly interesting, because it connects to the Shopify Liquid language server. A language server can check your project against common errors. It can scan a project’s context across files and is way more powerful than an individual file check (e.g. for fixing component import issues)
Later in August, I also started working on a Svelte plugin, which hasn’t been released yet due to time constraints. I use it for my own work and it’s pretty cool. There’s a Svelte plugin on the Jetbrains community that’s not so hot with pretty bad reviews. It also connects to a language server using LSP (Language Server Protocol).
Content-wise, this is actually pretty fun to work on: syntax highlighting is based on a lexer, that has to understand the language and it’s constraints. Since Nunjucks and Liquid are “mixed” languages this can get quite challenging to get right. By mixed languages, we mean they can contain more than just 1 language - files might contain inline CSS blocks or JSON,
It doesn’t stop at syntax highlighting: Jetbrains editors have lots of small features for productivity like code block collapsing, live editing and automatic reformatting. In order to create a good plugin, one must also understand those features in order to support them well.
This is a small side project that’s currently responsible for just $275 dollars in revenue across a few months; but it’s one of those things that might just stay running for years with minimal upkeep. I’m looking forward to see how it evolves.
As the founder of Obra Studio, Johan's mission is to help software companies get to the next design level. He’s forever looking for the perfect balance between aesthetics and usability.