Add allowComments and allowTrailingCommas to https://opencode.ai/config.json JSON schema #1441

Closed
opened 2026-02-16 17:30:59 -05:00 by yindo · 3 comments
Owner

Originally created by @garrett-hopper on GitHub (Aug 22, 2025).

Originally assigned to: @rekram1-node on GitHub.

Using the VSCode JSON LSP from Nvim, there's no way to configure these settings when using a $schema in the file.

It would be convenient if these lines were added to https://opencode.ai/config.json

"allowComments": true,
"allowTrailingCommas": true

Current workaround is to create a ~/.config/opencode/schema.json file:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "https://opencode.ai/config.json",
  "allowComments": true,
  "allowTrailingCommas": true
}

and use "$schema": "file:///~/.config/opencode/schema.json" in all my opencode.jsonc files

Originally created by @garrett-hopper on GitHub (Aug 22, 2025). Originally assigned to: @rekram1-node on GitHub. Using the VSCode JSON LSP from Nvim, there's no way to configure these settings when using a `$schema` in the file. It would be convenient if these lines were added to https://opencode.ai/config.json ```json "allowComments": true, "allowTrailingCommas": true ``` Current workaround is to create a `~/.config/opencode/schema.json` file: ```json { "$schema": "http://json-schema.org/draft-07/schema#", "$ref": "https://opencode.ai/config.json", "allowComments": true, "allowTrailingCommas": true } ``` and use `"$schema": "file:///~/.config/opencode/schema.json"` in all my `opencode.jsonc` files
yindo closed this issue 2026-02-16 17:30:59 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 22, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2151: Both issues relate to problems with the opencode.ai/config.json schema. While #2151 reports the schema URL returning 404, this issue requests adding allowComments and allowTrailingCommas to that same schema, suggesting both are addressing schema-related concerns.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 22, 2025): This issue might be a duplicate of existing issues. Please check: - #2151: Both issues relate to problems with the opencode.ai/config.json schema. While #2151 reports the schema URL returning 404, this issue requests adding allowComments and allowTrailingCommas to that same schema, suggesting both are addressing schema-related concerns. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Aug 22, 2025):

Good callout I will add this

@rekram1-node commented on GitHub (Aug 22, 2025): Good callout I will add this
Author
Owner

@garrett-hopper commented on GitHub (Aug 23, 2025):

Thanks!

@garrett-hopper commented on GitHub (Aug 23, 2025): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1441