varabyte / kobweb-intellij-plugin

An official IntelliJ IDE plugin to include Kobweb-specific enhancements and understanding to your project
Apache License 2.0
11 stars 2 forks source link
ide intellij kobweb plugin

Kobweb IntelliJ Plugin


This plugin exists to support projects using Kobweb, by offering IDE UX enhancements, Kobweb-specific inspections, useful refactoring actions, and more.

The list of features includes but is not limited to:

Developing

So much of IntelliJ plugin development is outside the scope of anything we can hope to cover here. However, we'll share a few links, tips, and high level concepts.

First:

The IntelliJ API surfaces an astounding number of extension hooks. To add your own custom logic, search for your desired extension point here, implement it, and then register your implementation in the plugin's resources/META-INF/plugin.xml file.

The IntelliJ codebase is unfortunately not the most well documented, especially some of the older parts, so usually the best advice is to search open source plugins for examples of how to do what you want.

Consider referencing the IntelliJ Community codebase and the Android Studio codebase. You might also try searching through GitHub or grep.app to see how other plugins are implemented.

Running

A Run Plugin run configuration is provided for testing during development.

This will open up a new IntelliJ instance with the plugin installed. (This feels weird the first time you try it, but you'll get used to it!)

You can then open up a project and test your features. You can find sample projects under sample-projects/ which you can use.

Building

To build the plugin, run the Build Plugin run configuration.

The built plugin will be located in the plugin/build/distributions directory.

Installing

Once built, you can install the plugin from disk onto a real IDE environment.

Follow the official instructions here.

Publishing

The Gradle task associated with publishing a plugin is :plugin:publishPlugin.

Publishing the plugin requires either credentials be set on your local machine or by using the project's GitHub publish action (preferred), as the credentials have been installed into the repository as a secret.

Before publishing, you should make sure you've reviewed the following checklist:

Finally, publish the plugin using the publishPlugin task (or using GitHub CI).

When finished, verify https://plugins.jetbrains.com/plugin/23883-kobweb is up to date.