Skip to content

[config json schema] declare default values and examples for in-ide documentation#754

Merged
adamdotdevin merged 2 commits into
anomalyco:devfrom
Schniz:schniz/add-self-documenting-configuration
Jul 8, 2025
Merged

[config json schema] declare default values and examples for in-ide documentation#754
adamdotdevin merged 2 commits into
anomalyco:devfrom
Schniz:schniz/add-self-documenting-configuration

Conversation

@Schniz

@Schniz Schniz commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

this makes most editors autocomplete the default value when you want to override,
acting as an in-ide documentation for the keybindings instead of forcing people to
go to the website.

the only thing I dislike about it is that it is repeating stuff from tui,
and the proof for the fragility of this solution is that the help keybinding
didn't work well and fixed in this PR.

maybe we can use ts->go generation, or go->ts codegen to ensure
they are always in sync.

but that's an issue for a different PR I guess.

screenshot

@Schniz

Schniz commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

last commit (1888824) also extends the description with the default value so it'll be visible in hover and hints in the keys themselves:
screenshot

@Schniz
Schniz force-pushed the schniz/add-self-documenting-configuration branch from 1888824 to fab30c4 Compare July 8, 2025 13:23
Schniz added 2 commits July 8, 2025 16:24
this makes most editors autocomplete the default value when you want to override,
acting as an in-ide documentation for the keybindings instead of forcing people to
go to the website.

the only thing I dislike about it is that it is repeating stuff from tui,
and the proof for the fragility of this solution is that the 'help' keybinding
didn't work well.

maybe we can use ts->go generation, or go->ts codegen to ensure
they are always in sync.

but that's an issue for a different PR I guess.
@Schniz
Schniz force-pushed the schniz/add-self-documenting-configuration branch from fab30c4 to 5fcea61 Compare July 8, 2025 13:24
@adamdotdevin
adamdotdevin merged commit 14d81e5 into anomalyco:dev Jul 8, 2025
@Schniz
Schniz deleted the schniz/add-self-documenting-configuration branch July 9, 2025 06:26
achembarpu pushed a commit to achembarpu/opencode that referenced this pull request Aug 4, 2025
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants