This is a JetBrains plugin for the FRG language, providing rich language support for IntelliJ IDEA and other JetBrains IDEs.
- Syntax Highlighting: Colorization for keywords, types, strings, comments, and more.
- Go to Definition:
- Jump to Type definitions (structs, enums).
- Jump to
@externDefsdefinitions.
- Structure View: Outline view of the file structure (Services, Types, Enums).
- Line Markers: Quick navigation icons for handlers.
- Code Completion: Basic completion for types and keywords.
- Find Usages: Find where types and enums are referenced.
- From Marketplace: Search for "FRG" in the IDE Plugin Marketplace (Coming soon).
- Manual: Download the
.zipfile from the Releases page and install it via "Install Plugin from Disk...".
- Open this folder (
jetbrains-frg-plugin) in IntelliJ IDEA. - Wait for Gradle sync to complete.
- Generate Parser and Lexer:
- Install the Grammar-Kit plugin in IntelliJ IDEA.
- Right-click on
src/main/kotlin/com/pinealctx/frg/Frg.bnfand select Generate Parser Code. - Right-click on
src/main/kotlin/com/pinealctx/frg/Frg.flexand select Run JFlex Generator. - Ensure the generated files are in
src/main/gen.
- Run the plugin using the
runIdeGradle task.
src/main/kotlin/com/pinealctx/frg/Frg.bnf: Grammar definition.src/main/kotlin/com/pinealctx/frg/Frg.flex: Lexer definition.src/main/kotlin/com/pinealctx/frg/psi: Generated PSI classes.src/main/resources/META-INF/plugin.xml: Plugin configuration.