An Interview with Jakub Chrzanowski, .ignore Plugin Author
In this interview, we speak with Jakub Chrzanowski (@hsz @hszanowski), the author of the .ignore plugin for the IntelliJ-based IDEs. This plugin lets you mark matched .ignore files in project view, assists with editing them, and helps you generate ignore rules using templates.
Welcome, Jakub! Before we get started, could you please tell us a bit about yourself and your background?
I started my development journey in primary school with Pascal. I had strong support from my teacher and his code listings from a dot-matrix printer. That was a very exciting beginning for a young fellow and sometimes I miss it a bit. Over the next 18 years, I explored some other programming languages like C, Perl, Java, PHP, and C# and ending, for now, with NodeJS, TypeScript, and Kotlin. My focus has mainly been on the web development and DevOps with a touch of JetBrains plugins crafting in my free time.
What is the .ignore plugin and how did it come about?
The .ignore plugin is a tool that helps developers handle .gitignore files in a more complex format than just a plain text file with some glob-like rules. The main features of the plugin are:
- Syntax highlighting,
- Marking ignored files in the Project View,
- Providing predefined templates from https://github.com/github/gitignore,
- Custom user templates.
In addition to the basic functionality that was provided at the very beginning of the project, many smaller integrations with the IDE itself can be found. Support for subsequent file types is constantly being added too, because it is not only .gitignore files that are supported. Files such as .dockerignore, .npmignore, .prettierignore, and .hgignore (Mercurial version control system that uses both glob and regex rules) are handled, plus many others whose support has been requested by the users.
Why did you decide to create the plugin and what’s your motivation for its continued development over the years?
Just over five years ago, at my previous company we were using Git and PhpStorm for some work around the Symfony framework and WordPress add-ons. The project structure was a bit tricky and .gitignore was used heavily, but unfortunately, there was no built-in support for the project files tree coloring in the IDE. I had seen this kind of feature probably in Eclipse before and thought that it would be pretty handy to have it here as well. After digging into the IntelliJ IDEA SDK and some other open-source plugins on GitHub and a few days of work in the basement (literally), I had finally managed to handle very basic syntax coloring.
After releasing this version, the first feature request appeared in the GitHub issues in relation to making some use of the community-driven gitignore templates repository hosted by GitHub itself.
Over the next few years, lots of ideas appeared: some good ones, but also some not-so-good ones. The SDK evolved and new IDEs were released (CLion, Rider), which caused me a little bit of trouble, and as I am not a JetBrains developer, it could be tricky to work with some core functionalities in the proper way. There was always something to do and because of the growing community, I felt obliged to deliver something that would be helpful and free from bugs. The download statistics and community support always gave me an additional boost so that it was (almost ;-)) always fun.
What is the current state of the plugin and what are the plans for its future development and features?
Currently, the .ignore plugin is in a maintenance phase and supports the IDEs in versions from 2017.1 to 2019.1.3. The decision to limit the support for the 2019.2 was made together with JetBrains because there is native support for .gitignore planned in the next IDE versions and this will avoid some functionality conflicts.
For now, the .ignore plugin repository has been transferred to the JetBrains organization account.
Have you developed any other plugins for IntelliJ-based IDEs?
Currently I am working on the extension for Search Everywhere called Packages Search. It will let you quickly search for the packages/dependencies across the NPM/Maven/Packagist/PyPi repositories and present the results with the item details (plus maybe some quick install/update actions). A proof of concept video was recently published on my Twitter as well as a call for plugin testers.
A few years back I also started working on the LaTeX plugin which I have since put on hold because of some time limitations and a lack of knowledge about the lexer. But no worries – it is going to be rebooted, rewritten with Kotlin, and include all of the good practices I’ve learned since then.
There were also some other small plugins that didn’t really get any attention and this is totally fine, because not everything that we develop has to be a must-have-killer-feature. But we have to keep trying. 🙂
Can you tell us what you liked about the plugin development process and what could be improved?
The process for the development of plugins has improved over recent years. It is now very easy to set up a basic plugin scaffold using Gradle and the Kotlin language, which I’d personally recommend to everyone. The deployment process is very simple thanks to the gradle-intellij-plugin and allows you to create a nice CI/CD process.
The only thing that can get a bit complicated is supporting multiple IDE versions (2016.x, … 2019.x) because of the differences in the SDKs and the deprecations/new features. It requires some branching model in the git repository – there is probably a better way to do it, but that was enough for me at this point.
Do you have any recommendations or tips for anyone who wants to build on top of the IntelliJ Platform?
Besides the official SDK documentation, which may be useful at the beginning, I can definitely recommend searching the plugin repository, which allows you to filter the results for the referenced plugins’ source code.
Checking the sources of others can be a great inspiration and a real time saver.
Also, you have to remember about communication – ask other developers for help if you get stuck, ask for a review, test, and try to publish your plugin to a wider audience. Building the community around your open source project is just as important as the time you invest in your work.
Thank you Jakub for taking the time to chat with us and for your work on the .ignore plugin for the IntelliJ-based IDEs.