feat(config): add Neovim and Renode typed inputs

This commit is contained in:
MDietermann
2026-04-14 10:01:40 +02:00
parent e830e4dfda
commit e2637bc093
3 changed files with 66 additions and 0 deletions

View File

@@ -45,6 +45,22 @@ type ShellConfigSection struct {
Blocks []ShellConfigBlock `yaml:"blocks"`
}
type NeovimConfig struct {
NvChadStarterRepo string `yaml:"nvchad_starter_repo"`
}
type RenodePlatform struct {
Name string `yaml:"name"`
ReplPath string `yaml:"repl_path"`
Machine string `yaml:"machine"`
}
type RenodeConfig struct {
WokwiVersion string `yaml:"wokwi_version"`
WokwiURL string `yaml:"wokwi_url"`
Platforms []RenodePlatform `yaml:"platforms"`
}
// Config is the fully-resolved runtime configuration.
type Config struct {
Version int `yaml:"version"`
@@ -58,6 +74,8 @@ type Config struct {
Zellij ZellijConfig `yaml:"zellij"`
Themes ThemesConfig `yaml:"themes"`
ShellConfig ShellConfigSection `yaml:"shell_config"`
Neovim NeovimConfig `yaml:"neovim"`
Renode RenodeConfig `yaml:"renode"`
}
const currentVersion = 1
@@ -137,5 +155,11 @@ func merge(base, over Config) Config {
if len(over.ShellConfig.Blocks) > 0 {
out.ShellConfig = over.ShellConfig
}
if over.Neovim.NvChadStarterRepo != "" {
out.Neovim = over.Neovim
}
if over.Renode.WokwiVersion != "" || len(over.Renode.Platforms) > 0 {
out.Renode = over.Renode
}
return out
}