ludic/tools/editors/jetbrains
Orkuncakilkaya 790eda6f73
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 20s
ci / build-and-test (push) Successful in 1m31s
commit-lint / conventional-commits (push) Successful in 6s
docs / build-and-deploy (push) Successful in 23s
feat(types): option (some/none) safety type (#53)
Types phase 3 — the option/result safety pair. result/ok/err/try shipped in
#46; this adds its companion option:

- some(v)   -> option   (present value; any i32-width scalar)
- none()    -> option   (empty; no magic -1 sentinel)
- is_some / is_none -> bool
- unwrap_or(o, fallback) -> int

A heap %Option = { i32 present, i32 value }, bare builtins guarded by find_fn
(a user fn of the same name still wins), gated by g_uses_option so unused
programs compile byte-identically — same idiom as result.

Wired: emit_call codegen + %Option decl (emit_decl) + g_uses_option (emit_core),
reseeded seed, vocabulary sync (header/JetBrains/TextMate), builtin docs +
inventory, and a self-asserting example (examples/library/optionresult.ludic +
feat_case). All suites green incl. golden renders byte-identical and the
bootstrap fixpoint.

Tagged-union enums (variant payloads + binding match + exhaustiveness) are the
deep type-system feature, split out to #56.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 19:11:27 +03:00
..
gradle/wrapper Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete 2026-08-27 15:15:35 +03:00
src feat(types): option (some/none) safety type (#53) 2026-08-31 19:11:27 +03:00
build.gradle.kts Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete 2026-08-27 15:15:35 +03:00
gradle.properties Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete 2026-08-27 15:15:35 +03:00
gradlew Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete 2026-08-27 15:15:35 +03:00
gradlew.bat Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete 2026-08-27 15:15:35 +03:00
README.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
settings.gradle.kts Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete 2026-08-27 15:15:35 +03:00

Ludic for JetBrains IDEs

Works in IntelliJ IDEA (Community and Ultimate), CLion, GoLand, PyCharm, Rider, WebStorm — anything on the IntelliJ Platform 2023.2 through 2026.2 (since-build 232, until-build 262.*).

until-build 262 is deliberately ahead of the newest released platform — 2025.3 is build 253, and no 262 IDE exists yet. That headroom is the point: an until-build pinned to today's IDE gets the plugin auto-disabled the moment a user upgrades.

Two things are machine-checked rather than assumed, because a plugin that packages cleanly can still fail to load:

  • ./gradlew verifyPlugin runs JetBrains' own Plugin Verifier over the built artifact against 2025.3 and reports Compatible, with no deprecated or scheduled-for-removal API usages.
  • ./gradlew runIde boots a real IDEA 2025.3 with the plugin installed. The sandbox log line to look for is Loaded custom plugins: LSP4IJ (0.20.1), Ludic (1.0.0) in .intellijPlatform/sandbox/Ludic/IC-2025.3/log/idea.log.

If the plugin does not appear in Settings -> Plugins after installing, the cause is almost always that the IDE's build number is outside since-build..until-build. IntelliJ installs the declared dependency (LSP4IJ) from Marketplace first and only then rejects the incompatible plugin, so the symptom is "LSP4IJ got installed, mine did not". Check Help -> About for the build number and widen pluginUntilBuild in gradle.properties to match.

Building

Gradle must run on JDK 17–21. A newer JDK fails with a bare version number as the error message, which is not obvious the first time you see it:

export JAVA_HOME=$(/usr/libexec/java_home -v 21)     # macOS
cd tools/editors/jetbrains
./gradlew buildPlugin        # -> build/distributions/Ludic-1.0.0.zip
./gradlew runIde             # try it in a sandbox IDE

The first build downloads an IntelliJ IDEA Community distribution (over 1 GB), so expect it to take a while; later builds take seconds. Once the cache is warm,

LUDIC_TEST_JETBRAINS=1 bin/x test-tools

includes the plugin build in the toolchain's own test run.

Install the zip with Settings -> Plugins -> ⚙ -> Install Plugin from Disk. LSP4IJ is a required dependency; the IDE offers to install it for you.

Settings

Settings -> Languages & Frameworks -> Ludic — the path to ludic-lsp and to ludicc. Both default to bin/ under the project root, which is where bin/x tools puts them.