Skip to content

Commit 9b218ca

Browse files
AnnatarHeclaude
andcommitted
feat(auth): add schema header to generated YAML config
Add yaml-language-server $schema comment to generated config.yaml for IDE autocompletion support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent addddfc commit 9b218ca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

commands/auth.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ func commandAuth(c *cli.Context) error {
4949
if err != nil {
5050
return fmt.Errorf("failed to marshal default config: %w", err)
5151
}
52+
// Prepend $schema for IDE autocompletion support
53+
schemaHeader := "# yaml-language-server: $schema=https://shelltime.xyz/schemas/config.schema.json\n"
54+
content = append([]byte(schemaHeader), content...)
5255
err = os.WriteFile(configFile, content, 0644)
5356
if err != nil {
5457
return fmt.Errorf("failed to create config file: %w", err)

0 commit comments

Comments
 (0)