Interview with Matouš about News in PhpStorm Plugins
If you use PhpStorm, you likely have plugins installed to enhance your collaboration with the Nette Framework. These include Nette framework helpers, Latte, Neon, Nette Tester, and Nette factory interface generator. Historically, several authors, including Jan Doleček, Jan Tvrdík, David Matějka, and Jirka Pudil (and certainly other contributors), have been involved in their creation and development. Today, I had the opportunity to interview a new developer, Matouš Němec, who has recently revived their development after a long hiatus.
Hi Matouš, I've noticed your recent activity around PhpStorm plugins related to the Nette Framework. How long did you work on development before releasing the first update? And perhaps an unnecessary question, but what motivated you to do it?
I first encountered it about two years ago. But I just looked at the code, was horrified because I had no idea what was happening, and that was it. Then sometime last November or December, I decided that it couldn't go on like this, that the plugins weren't progressing, and I also had a need to move forward with it to save myself time. So the initial impulse was related to my needs. But once I published it on Slack, I got a lot of feedback and realized it was going to be a bigger thing than I expected 😀
I've recently been leaning towards Java, so it's motivating me to improve in Java as well. To answer the question, I've been working on it for about four months now.
The advantage is that it's possible to communicate easily with the original authors, and they guided me when I needed help.
Four months is both a long and short time, depending on the perspective. I think positive feedback can serve as a great driving force. After four months, how do you evaluate the API and the general documentation for writing plugins?
Yes, it's nice to get positive feedback, but it's more like the cherry on top. If that were my only motivation, it probably wouldn't last long.
After four months, I feel like someone who at least knows something about plugin development for IntelliJ platforms 😀 But I still have room to grow, especially in areas not covered in the documentation. I would say that over the last few years, they have improved and added a lot of information to the documentation. The basic information is there (theory and examples), but some things are missing, and you need to look them up in the code of other plugins or directly in the IntelliJ code.
Some answers exist on the JetBrains forum, but when searching on Google, it's annoying that it often leads to solving the problem from a PhpStorm user's perspective and not a plugin developer's perspective.
It started with the Latte plugin, and today you also contribute to the plugins for Neon, Tester, and Nette. Do you have a particular affinity for any of them? Meaning, are you more inclined to improve one over the others?
Yes, it started with the Latte plugin because I mostly missed the references, i.e., seeing the method used in the template when clicking from the method. Without that, refactoring was always a nightmare, especially when it came to methods with generic names, like getName.
Eventually, my efforts extended to other plugins; for example, in Tester, I missed line markers and run configuration via remote interpreters. In Neon, I missed clicking on used classes in the configuration file and methods used under the setup key. Since I already had experience with the Latte plugin, modifying the other plugins wasn't as difficult.
I still probably gravitate most towards the Latte plugin because it's the most complex plugin that solves the most issues. So, I usually develop there and then apply the learned experiences to the other plugins.
Can you summarize the main points users will find in the Latte plugin that was released to the plugin store last week?
The most important points are that it is now possible to specify variable types in the template using new macros. This allows the plugin to know which methods, properties, and constants can be called on the given variables. The plugin also highlights non-existent classes, methods, and other PHP elements. Another very important feature is auto-completion and suggestions after the suggestion. For example, it now completes the paired tag or the ending curly bracket if it is missing. And other such tweaks that save time when writing. I hope that in the future, Latte will almost write itself 😀
Of course, the most important thing is clicking from PHP to Latte to places where the given PHP elements are used and support for refactoring rename. That was the initial reason for my initiative.
So you've mentioned things that users will already find in the plugin. Do you have other features in the works that we can look forward to? A little peek behind the curtain?
Yes, I'm currently refining the Neon plugin, which will have improved suggestions for basic keys associated with Nette. Overall, these keys will now know their type and will also be checked, for example, if an INT is used somewhere when a BOOL is required. References for methods used under the setup key: in service definitions (ideally, this would also be in CompilerExtension), but I don't know if that will be possible. I also want NEON to be able to pull extensions and their config schema so that the suggestions work for custom extensions as well.
Regarding the Latte plugin, two major new features are planned: optional chaining and support for array type hints, such as string[] or FooClass[], so that it correctly suggests when used in foreach or with ArrayAccess.
Thanks a lot for describing what you're currently working on and what we can expect. Let's move to the last question. Is there anything I or someone else can do to help you? Are you dealing with financial support for development? Or how and where to send improvement suggestions?
I plan to transfer all the work issues from GIST to the individual repositories on GitHub. So ideas and what would be useful can be added there with the enhancement label.
As for financial support, I would welcome it. It's always better to program when someone supports you 🙂 Currently, there's a link to PayPal and an account number on the forum. I've learned about the possibility of support through Patreon or GitHub, where it's apparently possible to send donations regularly, so I want to set that up. I think there's more and especially longer-term motivation to get maybe 100 CZK a month rather than 2000 CZK one-time.
If a company is interested, I can issue an invoice if they want to include the donation in their expenses. Ultimately, the improved plugins save money, especially for companies.
Otherwise, if someone is very interested and wants to get involved in plugin development, I'd be happy to share my development experience, and we can collaborate 🙂
Thanks for the interview
Find more about the plugin on the Nette forum
You can support Matouš on patreon.com/mesour.
Sign in to submit a comment