1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{
"lsp": {
"ruby-lsp": {
"_comment": "Ruby LSP for mruby. The installed Dispatch harness reads this opencode.json `lsp` block (via its B6 parser) ONLY when .dispatch/lsp.json is absent — so a fresh clone gets this config. The harness reads `command`/`extensions`/`env`/`initialization` here (NOT the editor-style `enabled`/`settings`). ruby-lsp targets MRI, so formatter+linters are off (they'd false-positive on mruby); navigation + RBS-backed intelligence stay on. The hand-written RBS in sig/ (raylib/rmlui/flecs/jolt/jamstack) give hover/completion/definition for the C/C++ mrbgem bindings. env notes: `bundle` is not on the default PATH (it lives in the user gem bin dir), and without GEM_HOME bundler installs into the root-owned system gem dir → PermissionError. PATH/GEM_HOME/GEM_PATH fix both.",
"command": ["/home/tradam/.local/bin/ruby-lsp"],
"extensions": [".rb"],
"env": {
"PATH": "/home/tradam/.local/bin:/home/tradam/.local/share/gem/ruby/3.4.0/bin:/home/tradam/.local/share/mise/shims:/home/tradam/.bun/bin:/usr/local/sbin:/usr/local/bin:/usr/bin",
"GEM_HOME": "/home/tradam/.local/share/gem/ruby/3.4.0",
"GEM_PATH": "/home/tradam/.local/share/gem/ruby/3.4.0"
},
"initialization": {
"rubyVersion": "3.4.0",
"formatter": "none",
"linters": [],
"enabledFeatures": {
"diagnostics": false,
"codeActions": false,
"codeLens": false,
"typeHierarchy": false,
"workspaceSymbols": false,
"onTypeFormatting": false,
"hover": true,
"completion": true,
"definition": true,
"signatureHelp": true,
"documentSymbols": true,
"foldingRanges": true,
"selectionRanges": true,
"inlayHints": true,
"semanticHighlighting": true
}
}
},
"clangd": {
"_comment": "clangd for the C/C++ mrbgem bindings (mrbgems/*/src/*) + src/main.c. clangd is at /usr/lib/llvm21/bin/clangd (not on PATH, so absolute). Compile flags (include roots vendor/{mruby,raylib,rmlui,flecs,joltc} + -DMRB_INT64) live in compile_commands.json, GENERATED by `ruby tools/gen_compile_commands.rb` (rebuild.sh regenerates it) — clangd's no-compile-db fallback resolves -I paths against the file's dir and breaks, so the generator (setting directory=project root) is required. .clangd holds Index config. Targets the DESKTOP build; web-only <emscripten.h> is #ifdef __EMSCRIPTEN__ (not defined) so skipped. --background-index builds a persistent cross-file index (definition/refs across the 6 C/C++ units); --clang-tidy is OFF (it would flag the vendored/macro-heavy code).",
"command": ["/usr/lib/llvm21/bin/clangd", "--background-index", "--log=error"],
"extensions": [".c", ".h", ".cpp", ".cc", ".cxx", ".hpp"]
}
},
"_disabled_lsp_note": "Steep LSP was here but was DISABLED 2026-06-25 — its langserver drifted into a corrupted state after ~3h (phantom Ruby::SyntaxError on a comment line; a fresh `steep check` CLI stays GREEN and is the authoritative gate via tools/check-types.sh) and re-errored on every .rb edit, hanging the editor. The full steep LSP config is preserved in opencode.lsp-steep.disabled.json — paste its `steep` block back into `lsp` to re-enable. See .agents/knowledge/steep.md + HANDOFF-per-edit-diagnostics.md."
}
|