In 2014, I have written a just for fun plugin in about 2 hours (check out my write-up [1]). I've followed the "How to make an IntelliJ IDEA plugin in less than 30 minutes" [2] guide back then. Unfortunately, this guide seems to be outdated, but now there's an official guide [3].
[1] https://darekkay.com/blog/what-the-commit-plugin-for-intelli...
[2] https://www.cnblogs.com/meetrice/p/5184827.html
[3] https://jetbrains.org/intellij/sdk/docs/basics/getting_start...