Plugin is written on Kotlin language. If you can program in Java, you should be able to read and write Kotlin code right away. Kotlin is deeply similar to Java, but has less verbose syntax and better safety.
Java 17 is required for development. For example, you can install Amazon Corretto. You can also install Java just from your IntelliJ IDEA.
git clone [email protected]:Mervap/LamaPlugin.git
cd LamaPlugin
Gradle with gradle-intellij plugin used to build the plugin. It
comes with a wrapper script (gradlew
in the root of the repository) which downloads appropriate version of gradle
automatically as long as you have JDK installed.
Common Gradle tasks are:
-
./gradlew buildPlugin
-- fully build plugin and create an archive atbuild/distributions
which can be installed into your IDE viaInstall plugin from disk...
action found inSettings > Plugins
. -
./gradlew runIde
-- run a development IDE with the plugin installed -
./gradlew test
-- run tests. We love tests!
You might want to install the following plugins:
- Grammar-Kit to get highlighting for the files with BNFish grammar.
- PsiViewer to view the AST of Lama files right in the IDE.
Please use reformat code action to maintain consistent style. Pay attention to IDEA's warning and suggestions, and try to keep the code green. If you are sure that the warning is false positive, use an annotation to suppress it.
Try to avoid copy-paste and boilerplate as much as possible. For example, proactively use ?:
to deal with nullable
values.