## Add Make these things configurable - Expand aliases - Suggest hidden files (#59) - Toggle menu and mode ``` [ui] hidden-files = true # or false [core] expand-alias = true # or false [keybindings] toggle-mode = "ctrl+r" toggle-menu = "ctrl+space" ``` - Auto reload config on changes: now just changes config and save the file, IRIS will auto detect and reload in silent - Added all these in config on init and docs ## Fix I tested on holding backspace and the ghost text keep glitching so I fixed it, this is just a small fix
59 lines
1.1 KiB
Go
59 lines
1.1 KiB
Go
package config
|
|
|
|
import "time"
|
|
|
|
func DefaultConfig() *Config {
|
|
return &Config{
|
|
Core: CoreConfig{
|
|
Version: 1,
|
|
Shell: "",
|
|
Mode: "last",
|
|
Debug: false,
|
|
ExpandAlias: true,
|
|
},
|
|
UI: UIConfig{
|
|
Style: "modern",
|
|
GhostText: true,
|
|
ShowHiddenFiles: false,
|
|
MaxSuggestions: 100,
|
|
MaxHeight: 15,
|
|
NerdFonts: true,
|
|
},
|
|
Git: GitConfig{
|
|
FilterActiveBranch: true,
|
|
DeduplicateBranches: true,
|
|
},
|
|
Updater: UpdaterConfig{
|
|
CheckOnStartup: true,
|
|
Channel: "stable",
|
|
CheckInterval: Duration(24 * time.Hour),
|
|
},
|
|
AI: AIConfig{
|
|
Enabled: false,
|
|
Provider: "",
|
|
DebounceMS: 500,
|
|
MinIntervalMS: 1000,
|
|
Providers: nil,
|
|
SuggestOnEmpty: SuggestOnEmptyConfig{
|
|
Enabled: false,
|
|
DebounceMS: 800,
|
|
MinIntervalMS: 5000,
|
|
},
|
|
},
|
|
Keybindings: KeybindingsConfig{
|
|
ToggleMode: "ctrl+r",
|
|
ToggleMenu: "shift+tab",
|
|
},
|
|
}
|
|
}
|
|
|
|
func DefaultState() *State {
|
|
return &State{
|
|
LastMode: "spec",
|
|
Updater: UpdaterState{
|
|
LastCheckTime: time.Time{},
|
|
SeenVersion: "",
|
|
},
|
|
}
|
|
}
|