Development Setup¶
Prerequisites¶
Requirement |
Version |
|---|---|
JDK |
21 or later |
IntelliJ IDEA |
2025.3+ (Ultimate or Community) |
Git |
Any recent version |
Node.js |
For testing LSP features |
Clone the Repository¶
git clone https://github.com/Nagatatz/rescript-intellij-plugin.git
cd rescript-intellij-plugin
Open in IntelliJ IDEA¶
Open IntelliJ IDEA
File → Open → Select the cloned repository
IntelliJ will detect the Gradle project and import it automatically
Wait for the Gradle sync to complete (this downloads dependencies)
Verify the Setup¶
Run the build to ensure everything is configured correctly:
./gradlew buildPlugin
This will:
Generate the JFlex lexer (
RescriptFlexLexer.java) fromRescript.flexCompile all Kotlin source code
Run ktlint checks
Package the plugin
Run a Development IDE Instance¶
./gradlew runIde
This launches a fresh IntelliJ IDEA instance with the plugin loaded. You can open a ReScript project in this instance to test your changes.
Project JDK Configuration¶
If IntelliJ doesn’t automatically detect your JDK:
File → Project Structure → Project
Set SDK to JDK 21+
Set Language level to 21
Recommended IDE Plugins¶
For development, consider installing these plugins in your development IDE:
Kotlin — Should be bundled
Gradle — Should be bundled
Grammar-Kit — Helpful for working with JFlex/BNF grammars