ludic/tools/editors/zed/README.md
Orkuncakilkaya 985f9ad8f2 Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete
Self-hosted compiler (selfhost/*.ludic), runtime, examples, editor tooling,
and docs. Phase 1 of the syntax-redesign cohesion pass has landed:
edge-system fix, signature-query, when-alias, and the documentation truth-pass.
Suite green (14/14), C-free bootstrap fixpoint holds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-27 15:15:35 +03:00

1.1 KiB

Ludic for Zed

Zed extensions want a Tree-sitter grammar for highlighting, which this toolchain deliberately does not ship — the vocabulary lives in one C header and is exposed through the language server's semantic tokens instead, so there is no second grammar to keep honest.

That is enough for Zed: point it at ludic-lsp and highlighting, completion, diagnostics and formatting all arrive over LSP.

Add to ~/.config/zed/settings.json:

{
  "lsp": {
    "ludic-lsp": {
      "binary": { "path": "/path/to/gpp/build/ludic-lsp", "arguments": ["--stdio"] },
      "initialization_options": {
        "compilerPath": "/path/to/gpp/build/ludicc",
        "compilerDiagnostics": true,
        "indentSize": 2
      }
    }
  },
  "file_types": { "Ludic": ["ludic"] },
  "languages": {
    "Ludic": {
      "language_servers": ["ludic-lsp"],
      "tab_size": 2,
      "hard_tabs": false,
      "format_on_save": "on"
    }
  }
}

If you would rather have static highlighting too, the TextMate grammar in tools/editors/shared/ludic.tmLanguage.json can be dropped into a Zed extension that declares a grammars entry — but it is not required.