Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Schniz
Copy link
Contributor

@Schniz Schniz commented Jul 8, 2025

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
Copy link
Contributor Author

Schniz commented Jul 8, 2025

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 sst:dev Jul 8, 2025
@Schniz Schniz deleted the schniz/add-self-documenting-configuration branch July 9, 2025 06:26
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