anomalyco / anomalyco/opencode
[Reopen request] .jsonc missing from LANGUAGE_EXTENSIONS makes JSON/JSONC configs undiagnosable (closed NOT_PLANNED in #15859)
@rekram1-node is already working on this.
Since Sep 13, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Requesting reconsideration of #15859 (closed NOT_PLANNED, 2026-07-03). The .jsonc gap it names is still present on 1.18.30 and now has a concrete, user-visible impact plus a one-line fix.
Mechanism
.jsonc is absent from LANGUAGE_EXTENSIONS, so the LSP didOpen languageId falls back to "plaintext". Servers that dispatch on languageId (biome, and the standard JSON LS) then ignore the document entirely.
packages/opencode/src/lsp/language.ts:1 export const LANGUAGE_EXTENSIONS: Record<string, string> = {
packages/opencode/src/lsp/language.ts:53 ".json": "json", // no ".jsonc" key anywhere in the map
packages/opencode/src/lsp/client.ts:560 const languageId = LANGUAGE_EXTENSIONS[extension] ?? "plaintext"
packages/opencode/src/lsp/server.ts:296ΓÇô325 lists .jsonc in Biome's extensions, so the file is routed to the server ΓÇö it just arrives as plaintext.
Impact (why this is worth the one line now)
Both opencode-family config files are .jsonc: ~/.config/opencode/opencode.jsonc and OMO's ~/.omo/omo.jsonc. With this gap, neither can get diagnostics from any JSON language server ΓÇö including the schema validation that would catch unsupported keys. That directly blocks the workflow in #41014 (schema validation for opencode.jsonc), where I verified the published schema yields no diagnostics.
Side-by-side repro (identical bytes, bare dir, "lsp": true)
broken.json -> <diagnostics ...> ERROR [4:1] Expected an array, an object, or a literal but instead found '}'.
broken.jsonc -> (no <diagnostics> block for this file)
Second probe with a schema violation and $schema in the document:
probe2.json -> (no diagnostic ΓÇö separate issue, #41014)
probe2.jsonc -> (no diagnostic)
Independent confirmation that the server can handle .jsonc: through oh-my-openagent's own lsp_diagnostics path the same file reports error[biome] (parse) at 4:0: Expected an array, an object, or a literal but instead found '}'.
Expected vs actual
Expected: .json and .jsonc behave identically (both are JSON-with-comments; Biome supports both).
Actual: .json gets diagnostics; .jsonc is silently skipped.
Proposed fix
".jsonc": "jsonc",
(plus the other omissions already listed in #15859: .toml, .mdx, .pyi, .h/.hpp/.hh/.hxx/.h++, .R, and the bare makefile key). Related: #23663 (closed NOT_PLANNED) reported the same plaintext fallback for custom servers.
Verified 2026-09-13, opencode 1.18.30 (Windows 10 Pro 19045), plugin oh-my-openagent 4.19.4.
Environment (software)
| item | value |
|---|---|
| OS | Microsoft Windows 10 Pro — 10.0.19045 (Build 19045), 64-bit |
| Shell | PowerShell 7.6.6 (+ Windows Terminal) |
| opencode | 1.18.30 |
| plugins | oh-my-openagent 4.19.4 · @cortexkit/opencode-antigravity-auth 2.2.1 |
| runtimes | Node v24.19.0 · npm 11.17.0 · Bun 1.4.2 |
| LSP binaries | biome 2.5.13 · basedpyright 1.40.1 · roslyn-language-server 5.12.0-1.26426.8 · bash-language-server 5.6.0 · shellcheck 0.11.0 · vscode-langservers-extracted 4.10.0 · PowerShellEditorServices 4.7.0 · PSScriptAnalyzer 1.25.0 |
| logs | ~/.local/share/opencode/log/opencode.log · ~/.omo/agent/OmO-debug.log · ~/.omo/agent/logs/config-reload.log |
OS facts collected with:
Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,BuildNumber,OSArchitecture
No hardware, hostname, username, or credentials included.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.