diff options
author | Karim Khaleel <code.karim@gmail.com> | 2024-05-19 13:47:15 +0300 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-05-19 14:08:27 +0200 |
commit | 9b152d7619327da442d733b45075e17b631775e7 (patch) | |
tree | 728c33094c9ce426ba9504f0496895f78cc9d68a /pkg | |
parent | b98ae1c773f3bd264a484a007d4b0cbe1f422ddd (diff) |
Make Keybindings definition in UserConfig struct last
This makes the generated default config in Config.md match the original
order.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/config/user_config.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 4c0d50e52..2df6e60b8 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -19,8 +19,6 @@ type UserConfig struct { ConfirmOnQuit bool `yaml:"confirmOnQuit"` // If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close QuitOnTopLevelReturn bool `yaml:"quitOnTopLevelReturn"` - // Keybindings - Keybinding KeybindingConfig `yaml:"keybinding"` // Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc OS OSConfig `yaml:"os,omitempty"` // If true, don't display introductory popups upon opening Lazygit. @@ -38,6 +36,8 @@ type UserConfig struct { NotARepository string `yaml:"notARepository" jsonschema:"enum=prompt,enum=create,enum=skip,enum=quit"` // If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit. PromptToReturnFromSubprocess bool `yaml:"promptToReturnFromSubprocess"` + // Keybindings + Keybinding KeybindingConfig `yaml:"keybinding"` } type RefresherConfig struct { @@ -736,8 +736,14 @@ func GetDefaultConfig() *UserConfig { Method: "prompt", Days: 14, }, - ConfirmOnQuit: false, - QuitOnTopLevelReturn: false, + ConfirmOnQuit: false, + QuitOnTopLevelReturn: false, + OS: OSConfig{}, + DisableStartupPopups: false, + CustomCommands: []CustomCommand(nil), + Services: map[string]string(nil), + NotARepository: "prompt", + PromptToReturnFromSubprocess: true, Keybinding: KeybindingConfig{ Universal: KeybindingUniversalConfig{ Quit: "q", @@ -904,11 +910,5 @@ func GetDefaultConfig() *UserConfig { CommitMenu: "<c-o>", }, }, - OS: OSConfig{}, - DisableStartupPopups: false, - CustomCommands: []CustomCommand(nil), - Services: map[string]string(nil), - NotARepository: "prompt", - PromptToReturnFromSubprocess: true, } } |