feat(tooling): JetBrains IDE support, LSP navigation, barrel imports, package scripts and hooks

- JetBrains plugin 1.4.0: semantic colours (builtin / vendor / own), template strings,
  brace handling, run configurations and a test console, package.ludic and
  package.lock.ludic editing (completion, docs, app preview, colour previews, asset
  navigation), External Libraries for the runtime and packages, doc pages for built-ins
- ludic-lsp: go to definition for imports, document links, hover with inferred types,
  type definition, signature help with parameters, docs from docs/language
- `import "dir"` resolves a barrel `dir/index.ludic`
- package.ludic `entry`, `script` and `hook before|after <command>`; `ludic <script>`,
  `ludic script`, `ludic scripts`
- `ludic test --verbose` and `--test NAME`; the test runner filters by name

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-16 16:00:28 +03:00
parent da57b20156
commit f92d7f89c6
75 changed files with 46802 additions and 40343 deletions

View file

@ -0,0 +1,5 @@
bump: minor
type: feat
`import "camp"` imports a directory through its barrel, `camp/index.ludic` (a fragment
listing the directory's own imports). A directory without one is a clear error. Packages
resolve the same way: `import "ludic.render3d"` reads `ludic.render3d/index.ludic`.

23
changes/jetbrains-ide.md Normal file
View file

@ -0,0 +1,23 @@
bump: minor
type: feat
The JetBrains plugin covers much more of the IDE:
- Run configurations for `ludic run`/`build`/`test` (plus any other `ludic` command), with
gutter run buttons on `program` and on every `test "name"` block.
- Test results appear in the IDE's test tree, with navigation back to each test block.
- `file.ludic:line` locations are clickable in every console.
- Smart indentation on Enter and when typing a closing bracket; quotes pair up.
- A Color Scheme page and a Code Style page.
- Live templates, New Ludic File templates, and a Ludic project in File | New | Project.
- A Tools | Ludic menu, and a warning when the toolchain is missing.
- `package.ludic` is treated as a package manifest:
- a banner offers Fetch, Update, Verify, Run, Test, Build and Bundle, and warns when the lock is
missing or older than the manifest;
- gutter actions on `package` and `require` lines;
- completion and quick documentation for directives and `app` keys;
- its own icon.
- `script` and `hook` lines complete and are validated; each script has a run button, the
package banner has script shortcuts, and Tools | Ludic | Run Script… lists them all.
- The toolchain's and the project's packages are listed under External Libraries.
- The Structure view, parameter info and code-block navigation now come from `ludic-lsp`.
- The plugin is now 1.4.0 and requires IntelliJ Platform 2024.2 or newer and LSP4IJ 0.21.
- Fixed: Enter no longer inserts an extra `}`, and Comment Line no longer writes two spaces.

13
changes/lsp-navigation.md Normal file
View file

@ -0,0 +1,13 @@
bump: minor
type: feat
`ludic-lsp` navigates like the compiler resolves:
- Package imports (`import "ludic.render3d/r3d.ludic"`) resolve from `ludic_modules/` and the
toolchain's `packages/`, so their names hover, complete and jump. Import strings are links.
- `var` locals are tracked (declaration, usages, rename).
- Hover shows the declared or inferred type of locals, parameters and globals.
- Hover and go-to-definition on built-ins, built-in types and namespaces show the reference
page, with a link to the online docs. Release archives now ship `docs/language` for this.
- Go to type declaration (`textDocument/typeDefinition`) is supported.
- Signature help carries per-parameter ranges and follows named arguments.
- Completion inside a call offers the parameter names not given yet, `Namespace.` offers its
members, and results are ranked: locals first, then globals, built-ins and keywords.

View file

@ -0,0 +1,10 @@
bump: minor
type: feat
`package.ludic` gains `entry`, scripts and lifecycle hooks:
- `entry "src/game.ludic"` names the program `ludic run`/`build`/`bundle` compile. Without
it, the one file under `src/` that declares a `program` is used.
- `script "dev" "ludic run --headless"` defines a command: `ludic dev` (or `ludic script dev`)
runs it with any extra arguments, and `ludic scripts` lists them.
- `hook before|after <command> "…"` wraps `build`, `run`, `test`, `bundle`, `pack`, `get`, …
or a script. A failing `before` hook stops the command; `after` hooks run only on success.
- Quoted manifest values accept `\"` and `\\` escapes.

7
changes/test-filter.md Normal file
View file

@ -0,0 +1,7 @@
bump: minor
type: feat
Run a single test by name: a compiled test program takes the test's exact name as its
first argument (`./tests "adds"`), and `ludic test` gains `--test NAME` to pass it through.
A name that matches no test is reported and fails the run. `ludic test --verbose` (`-v`)
prints every test's `ok`/`FAIL` line, framed by `RUN <file>` … `PASS|FAIL <file>`, which is
what editor test views parse.