fix(theming): restore gruvbox as default via Default() helper
This commit is contained in:
@@ -97,6 +97,21 @@ func List() []Theme {
|
||||
return out
|
||||
}
|
||||
|
||||
// Default returns the archduino default theme. Used by the wizard's fresh-
|
||||
// install default and by callers that resolve an unknown theme ID.
|
||||
// The identity here is stable policy: gruvbox is the project's long-standing
|
||||
// default (carried over from the pre-Go installer). Changing this changes
|
||||
// the out-of-box experience on fresh systems.
|
||||
func Default() Theme {
|
||||
if t, ok := Get("gruvbox"); ok {
|
||||
return t
|
||||
}
|
||||
if len(discovered) > 0 {
|
||||
return discovered[0]
|
||||
}
|
||||
return Theme{ID: "gruvbox", DisplayName: "Gruvbox Dark", NvChadTheme: "gruvbox"}
|
||||
}
|
||||
|
||||
// Get returns the theme with the given ID, if present.
|
||||
func Get(id string) (Theme, bool) {
|
||||
for _, t := range discovered {
|
||||
|
||||
@@ -192,3 +192,9 @@ func TestApplyEachThemeWritesStarship(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestDefaultIsGruvbox(t *testing.T) {
|
||||
if got := Default(); got.ID != "gruvbox" {
|
||||
t.Fatalf("Default().ID = %q, want gruvbox", got.ID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user