Part of Phase 1 — Core skeleton (tasks.md Task 1.10).
Summary
Implement configuration loading, layering, schema registry, and live reload.
Details
- Tolerant JSONC parser (comments + trailing commas →
JSON.parse), with line/column error positions surfaced via the status sink. - Layering: defaults (from
contributes.configuration schemas + core defaults) ← user ~/.config/tecode/settings.json ← workspace .tecode/settings.json. tecode.config.get(key) reads the merged view. - Schema registry fed by
contributes.configuration (types + defaults; validation is best-effort MVP). fs.watch on both settings files and keybindings.json: on change re-parse, diff keys, fire onDidChangeConfiguration({ affectsConfiguration }), notify dependent services (hooks for theme/keymap; wired in later tasks).- Broken file → keep last good configuration, surface the parse error.
- Path resolution behind a
paths module (~/.config/tecode/ on POSIX, %APPDATA%\tecode\ on Windows).
Completion requirements
References
- requirements.md: Req 9.1–9.4
- design.md: §11, §17 (paths)
Dependencies
Blocked by: 1.2 (#3). Parallelizable with 1.3–1.9.
Part of Phase 1 — Core skeleton (tasks.md Task 1.10).
Summary
Implement configuration loading, layering, schema registry, and live reload.
Details
JSON.parse), with line/column error positions surfaced via the status sink.contributes.configurationschemas + core defaults) ← user~/.config/tecode/settings.json← workspace.tecode/settings.json.tecode.config.get(key)reads the merged view.contributes.configuration(types + defaults; validation is best-effort MVP).fs.watchon both settings files andkeybindings.json: on change re-parse, diff keys, fireonDidChangeConfiguration({ affectsConfiguration }), notify dependent services (hooks for theme/keymap; wired in later tasks).pathsmodule (~/.config/tecode/on POSIX,%APPDATA%\tecode\on Windows).Completion requirements
//)onDidChangeConfigurationwith a correctaffectsConfigurationpredicatebun testand lint passReferences
Dependencies
Blocked by: 1.2 (#3). Parallelizable with 1.3–1.9.