2020-10-03 14:54:55 +10:00
package config
2022-05-13 21:56:07 +09:00
import (
"time"
2023-09-30 02:47:06 +03:00
"github.com/karimkhaleel/jsonschema"
2022-05-13 21:56:07 +09:00
)
2020-10-04 09:53:56 +11:00
type UserConfig struct {
2023-09-30 14:52:44 +10:00
// Config relating to the Lazygit UI
Gui GuiConfig ` yaml:"gui" `
// Config relating to git
Git GitConfig ` yaml:"git" `
// Periodic update checks
Update UpdateConfig ` yaml:"update" `
// Background refreshes
Refresher RefresherConfig ` yaml:"refresher" `
// If true, show a confirmation popup before quitting Lazygit
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.
// Lazygit sets this to true upon first runninng the program so that you don't see introductory popups every time you open the program.
DisableStartupPopups bool ` yaml:"disableStartupPopups" `
// User-configured commands that can be invoked from within Lazygit
2023-09-30 02:47:06 +03:00
CustomCommands [ ] CustomCommand ` yaml:"customCommands" jsonschema:"uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-pull-request-urls
Services map [ string ] string ` yaml:"services" `
// What to do when opening Lazygit outside of a git repo.
// - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
// - 'create': initialize a new repo
// - 'skip': open most recent repo
// - 'quit': exit Lazygit
2023-09-30 02:47:06 +03:00
NotARepository string ` yaml:"notARepository" jsonschema:"enum=prompt,enum=create,enum=skip,enum=quit" `
2023-09-30 14:52:44 +10:00
// 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" `
2020-10-04 09:53:56 +11:00
}
2021-01-05 18:38:49 +01:00
type RefresherConfig struct {
2023-09-30 14:52:44 +10:00
// File/submodule refresh interval in seconds.
// Auto-refresh can be disabled via option 'git.autoRefresh'.
2023-09-30 02:47:06 +03:00
RefreshInterval int ` yaml:"refreshInterval" jsonschema:"minimum=0" `
2023-09-30 14:52:44 +10:00
// Re-fetch interval in seconds.
// Auto-fetch can be disabled via option 'git.autoFetch'.
2023-09-30 02:47:06 +03:00
FetchInterval int ` yaml:"fetchInterval" jsonschema:"minimum=0" `
2021-01-05 18:38:49 +01:00
}
2020-10-04 09:53:56 +11:00
type GuiConfig struct {
2023-09-30 14:52:44 +10:00
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-author-color
AuthorColors map [ string ] string ` yaml:"authorColors" `
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-branch-color
BranchColors map [ string ] string ` yaml:"branchColors" `
// The number of lines you scroll by when scrolling the main window
2023-09-30 02:47:06 +03:00
ScrollHeight int ` yaml:"scrollHeight" jsonschema:"minimum=1" `
2023-09-30 14:52:44 +10:00
// If true, allow scrolling past the bottom of the content in the main window
ScrollPastBottom bool ` yaml:"scrollPastBottom" `
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
ScrollOffMargin int ` yaml:"scrollOffMargin" `
// One of: 'margin' (default) | 'jump'
ScrollOffBehavior string ` yaml:"scrollOffBehavior" `
// If true, capture mouse events.
// When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
MouseEvents bool ` yaml:"mouseEvents" `
// If true, do not show a warning when discarding changes in the staging view.
SkipDiscardChangeWarning bool ` yaml:"skipDiscardChangeWarning" `
// If true, do not show warning when applying/popping the stash
SkipStashWarning bool ` yaml:"skipStashWarning" `
// If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
SkipNoStagedFilesWarning bool ` yaml:"skipNoStagedFilesWarning" `
// If true, do not show a warning when rewording a commit via an external editor
SkipRewordInEditorWarning bool ` yaml:"skipRewordInEditorWarning" `
// Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
// Number from 0 to 1.0.
2023-09-30 02:47:06 +03:00
SidePanelWidth float64 ` yaml:"sidePanelWidth" jsonschema:"maximum=1,minimum=0" `
2023-09-30 14:52:44 +10:00
// If true, increase the height of the focused side window; creating an accordion effect.
ExpandFocusedSidePanel bool ` yaml:"expandFocusedSidePanel" `
// Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
// Options are:
// - 'horizontal': split the window horizontally
// - 'vertical': split the window vertically
// - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
2023-09-30 02:47:06 +03:00
MainPanelSplitMode string ` yaml:"mainPanelSplitMode" jsonschema:"enum=horizontal,enum=flexible,enum=vertical" `
2023-11-26 13:11:50 +01:00
// How the window is split when in half screen mode (i.e. after hitting '+' once).
// Possible values:
// - 'left': split the window horizontally (side panel on the left, main view on the right)
// - 'top': split the window vertically (side panel on top, main view below)
EnlargedSideViewLocation string ` yaml:"enlargedSideViewLocation" `
2023-09-30 14:52:44 +10:00
// One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
2023-09-30 02:47:06 +03:00
Language string ` yaml:"language" jsonschema:"enum=auto,enum=en,enum=zh-TW,enum=zh-CN,enum=pl,enum=nl,enum=ja,enum=ko,enum=ru" `
2023-09-30 14:52:44 +10:00
// Format used when displaying time e.g. commit time.
// Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
TimeFormat string ` yaml:"timeFormat" `
// Format used when displaying time if the time is less than 24 hours ago.
// Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
ShortTimeFormat string ` yaml:"shortTimeFormat" `
// Config relating to colors and styles.
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
Theme ThemeConfig ` yaml:"theme" `
// Config relating to the commit length indicator
CommitLength CommitLengthConfig ` yaml:"commitLength" `
// If true, show the '5 of 20' footer at the bottom of list views
ShowListFooter bool ` yaml:"showListFooter" `
// If true, display the files in the file views as a tree. If false, display the files as a flat list.
// This can be toggled from within Lazygit with the '~' key, but that will not change the default.
ShowFileTree bool ` yaml:"showFileTree" `
// If true, show a random tip in the command log when Lazygit starts
ShowRandomTip bool ` yaml:"showRandomTip" `
// If true, show the command log
ShowCommandLog bool ` yaml:"showCommandLog" `
// If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
ShowBottomLine bool ` yaml:"showBottomLine" `
// If true, show jump-to-window keybindings in window titles.
ShowPanelJumps bool ` yaml:"showPanelJumps" `
// Deprecated: use nerdFontsVersion instead
ShowIcons bool ` yaml:"showIcons" `
// Nerd fonts version to use.
// One of: '2' | '3' | empty string (default)
// If empty, do not show icons.
2023-09-30 02:47:06 +03:00
NerdFontsVersion string ` yaml:"nerdFontsVersion" jsonschema:"enum=2,enum=3,enum=" `
2024-01-12 13:16:25 +01:00
// If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
ShowFileIcons bool ` yaml:"showFileIcons" `
2023-09-30 14:52:44 +10:00
// If true, show commit hashes alongside branch names in the branches view.
ShowBranchCommitHash bool ` yaml:"showBranchCommitHash" `
// Height of the command log view
2023-09-30 02:47:06 +03:00
CommandLogSize int ` yaml:"commandLogSize" jsonschema:"minimum=0" `
2023-09-30 14:52:44 +10:00
// Whether to split the main window when viewing file changes.
// One of: 'auto' | 'always'
// If 'auto', only split the main window when a file has both staged and unstaged changes
2023-09-30 02:47:06 +03:00
SplitDiff string ` yaml:"splitDiff" jsonschema:"enum=auto,enum=always" `
2023-09-30 14:52:44 +10:00
// Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default).
// One of: 'normal' (default) | 'half' | 'full'
2023-09-30 02:47:06 +03:00
WindowSize string ` yaml:"windowSize" jsonschema:"enum=normal,enum=half,enum=full" `
2023-09-30 14:52:44 +10:00
// Window border style.
// One of 'rounded' (default) | 'single' | 'double' | 'hidden'
2023-09-30 02:47:06 +03:00
Border string ` yaml:"border" jsonschema:"enum=single,enum=double,enum=rounded,enum=hidden" `
2023-09-30 14:52:44 +10:00
// If true, show a seriously epic explosion animation when nuking the working tree.
AnimateExplosion bool ` yaml:"animateExplosion" `
2023-09-29 16:18:45 -04:00
// Whether to stack UI components on top of each other.
// One of 'auto' (default) | 'always' | 'never'
PortraitMode string ` yaml:"portraitMode" `
2020-10-03 14:54:55 +10:00
}
type ThemeConfig struct {
2023-09-30 14:52:44 +10:00
// Border color of focused window
2023-09-30 02:47:06 +03:00
ActiveBorderColor [ ] string ` yaml:"activeBorderColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Border color of non-focused windows
2023-09-30 02:47:06 +03:00
InactiveBorderColor [ ] string ` yaml:"inactiveBorderColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Border color of focused window when searching in that window
2023-09-30 02:47:06 +03:00
SearchingActiveBorderColor [ ] string ` yaml:"searchingActiveBorderColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Color of keybindings help text in the bottom line
2023-09-30 02:47:06 +03:00
OptionsTextColor [ ] string ` yaml:"optionsTextColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Background color of selected line.
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#highlighting-the-selected-line
2023-09-30 02:47:06 +03:00
SelectedLineBgColor [ ] string ` yaml:"selectedLineBgColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Foreground color of copied commit
2023-09-30 02:47:06 +03:00
CherryPickedCommitFgColor [ ] string ` yaml:"cherryPickedCommitFgColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Background color of copied commit
2023-09-30 02:47:06 +03:00
CherryPickedCommitBgColor [ ] string ` yaml:"cherryPickedCommitBgColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Foreground color of marked base commit (for rebase)
MarkedBaseCommitFgColor [ ] string ` yaml:"markedBaseCommitFgColor" `
// Background color of marked base commit (for rebase)
MarkedBaseCommitBgColor [ ] string ` yaml:"markedBaseCommitBgColor" `
// Color for file with unstaged changes
2023-09-30 02:47:06 +03:00
UnstagedChangesColor [ ] string ` yaml:"unstagedChangesColor" jsonschema:"minItems=1,uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Default text color
2023-09-30 02:47:06 +03:00
DefaultFgColor [ ] string ` yaml:"defaultFgColor" jsonschema:"minItems=1,uniqueItems=true" `
2020-10-03 14:54:55 +10:00
}
2020-10-04 09:53:56 +11:00
type CommitLengthConfig struct {
2023-09-30 14:52:44 +10:00
// If true, show an indicator of commit message length
2020-10-04 09:53:56 +11:00
Show bool ` yaml:"show" `
2020-10-03 14:54:55 +10:00
}
2020-10-04 09:53:56 +11:00
type GitConfig struct {
2023-09-30 14:52:44 +10:00
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
Paging PagingConfig ` yaml:"paging" `
// Config relating to committing
Commit CommitConfig ` yaml:"commit" `
// Config relating to merging
Merging MergingConfig ` yaml:"merging" `
// list of branches that are considered 'main' branches, used when displaying commits
2023-09-30 02:47:06 +03:00
MainBranches [ ] string ` yaml:"mainBranches" jsonschema:"uniqueItems=true" `
2023-09-30 14:52:44 +10:00
// Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
SkipHookPrefix string ` yaml:"skipHookPrefix" `
// If true, periodically fetch from remote
AutoFetch bool ` yaml:"autoFetch" `
// If true, periodically refresh files and submodules
AutoRefresh bool ` yaml:"autoRefresh" `
// If true, pass the --all arg to git fetch
FetchAll bool ` yaml:"fetchAll" `
// Command used when displaying the current branch git log in the main window
BranchLogCmd string ` yaml:"branchLogCmd" `
// Command used to display git log of all branches in the main window
AllBranchesLogCmd string ` yaml:"allBranchesLogCmd" `
// If true, do not spawn a separate process when using GPG
OverrideGpg bool ` yaml:"overrideGpg" `
// If true, do not allow force pushes
DisableForcePushing bool ` yaml:"disableForcePushing" `
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
CommitPrefixes map [ string ] CommitPrefixConfig ` yaml:"commitPrefixes" `
// If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
// (This should really be under 'gui', not 'git')
ParseEmoji bool ` yaml:"parseEmoji" `
// Config for showing the log in the commits view
Log LogConfig ` yaml:"log" `
2020-10-04 09:53:56 +11:00
}
2020-10-03 14:54:55 +10:00
2023-09-30 02:47:06 +03:00
type PagerType string
func ( PagerType ) JSONSchemaExtend ( schema * jsonschema . Schema ) {
schema . Examples = [ ] any {
"delta --dark --paging=never" ,
"diff-so-fancy" ,
"ydiff -p cat -s --wrap --width={{columnWidth}}" ,
}
}
2020-10-04 09:53:56 +11:00
type PagingConfig struct {
2023-09-30 14:52:44 +10:00
// Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
2023-09-30 02:47:06 +03:00
ColorArg string ` yaml:"colorArg" jsonschema:"enum=always,enum=never" `
2023-09-30 14:52:44 +10:00
// e.g.
// diff-so-fancy
// delta --dark --paging=never
// ydiff -p cat -s --wrap --width={{columnWidth}}
2023-09-30 02:47:06 +03:00
Pager PagerType ` yaml:"pager" jsonschema:"minLength=1" `
2023-09-30 14:52:44 +10:00
// If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
UseConfig bool ` yaml:"useConfig" `
// e.g. 'difft --color=always'
2023-06-30 08:42:39 +02:00
ExternalDiffCommand string ` yaml:"externalDiffCommand" `
2020-10-04 09:53:56 +11:00
}
2020-10-03 14:54:55 +10:00
2021-11-14 14:31:15 +01:00
type CommitConfig struct {
2023-09-30 14:52:44 +10:00
// If true, pass '--signoff' flag when committing
2023-05-23 14:55:57 +01:00
SignOff bool ` yaml:"signOff" `
2021-11-14 14:31:15 +01:00
}
2020-10-04 09:53:56 +11:00
type MergingConfig struct {
2023-09-30 14:52:44 +10:00
// If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
// Only applicable to unix users.
ManualCommit bool ` yaml:"manualCommit" `
// Extra args passed to `git merge`, e.g. --no-ff
2023-09-30 02:47:06 +03:00
Args string ` yaml:"args" jsonschema:"example=--no-ff" `
2020-10-04 09:53:56 +11:00
}
2021-11-02 20:05:23 +11:00
type LogConfig struct {
2023-09-30 02:47:06 +03:00
// One of: 'date-order' | 'author-date-order' | 'topo-order | default'
2023-09-30 14:52:44 +10:00
// 'topo-order' makes it easier to read the git log graph, but commits may not
// appear chronologically. See https://git-scm.com/docs/
2023-09-30 02:47:06 +03:00
Order string ` yaml:"order" jsonschema:"enum=date-order,enum=author-date-order,enum=topo-order,enum=default" `
2023-09-30 14:52:44 +10:00
// This determines whether the git graph is rendered in the commits panel
2023-09-30 02:47:06 +03:00
// One of 'always' | 'never' | 'when-maximised'
ShowGraph string ` yaml:"showGraph" jsonschema:"enum=always,enum=never,enum=when-maximised" `
2023-09-30 14:52:44 +10:00
// displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
ShowWholeGraph bool ` yaml:"showWholeGraph" `
2021-11-02 20:05:23 +11:00
}
2020-10-04 09:53:56 +11:00
type CommitPrefixConfig struct {
2023-09-30 14:52:44 +10:00
// pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
2023-09-30 02:47:06 +03:00
Pattern string ` yaml:"pattern" jsonschema:"example=^\\w+\\/(\\w+-\\w+).*,minLength=1" `
2023-09-30 14:52:44 +10:00
// Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
2023-09-30 02:47:06 +03:00
Replace string ` yaml:"replace" jsonschema:"example=[$1] ,minLength=1" `
2020-10-04 09:53:56 +11:00
}
type UpdateConfig struct {
2023-09-30 14:52:44 +10:00
// One of: 'prompt' (default) | 'background' | 'never'
2023-09-30 02:47:06 +03:00
Method string ` yaml:"method" jsonschema:"enum=prompt,enum=background,enum=never" `
2023-09-30 14:52:44 +10:00
// Period in days between update checks
2023-09-30 02:47:06 +03:00
Days int64 ` yaml:"days" jsonschema:"minimum=0" `
2020-10-04 09:53:56 +11:00
}
type KeybindingConfig struct {
2023-05-18 19:15:23 +02:00
Universal KeybindingUniversalConfig ` yaml:"universal" `
Status KeybindingStatusConfig ` yaml:"status" `
Files KeybindingFilesConfig ` yaml:"files" `
Branches KeybindingBranchesConfig ` yaml:"branches" `
Worktrees KeybindingWorktreesConfig ` yaml:"worktrees" `
Commits KeybindingCommitsConfig ` yaml:"commits" `
Stash KeybindingStashConfig ` yaml:"stash" `
CommitFiles KeybindingCommitFilesConfig ` yaml:"commitFiles" `
Main KeybindingMainConfig ` yaml:"main" `
Submodules KeybindingSubmodulesConfig ` yaml:"submodules" `
CommitMessage KeybindingCommitMessageConfig ` yaml:"commitMessage" `
2020-10-04 09:53:56 +11:00
}
2021-04-11 23:32:20 +10:00
// damn looks like we have some inconsistencies here with -alt and -alt1
2020-10-04 09:53:56 +11:00
type KeybindingUniversalConfig struct {
2021-10-17 18:22:59 +01:00
Quit string ` yaml:"quit" `
QuitAlt1 string ` yaml:"quit-alt1" `
Return string ` yaml:"return" `
QuitWithoutChangingDirectory string ` yaml:"quitWithoutChangingDirectory" `
TogglePanel string ` yaml:"togglePanel" `
PrevItem string ` yaml:"prevItem" `
NextItem string ` yaml:"nextItem" `
PrevItemAlt string ` yaml:"prevItem-alt" `
NextItemAlt string ` yaml:"nextItem-alt" `
PrevPage string ` yaml:"prevPage" `
NextPage string ` yaml:"nextPage" `
2021-11-02 20:35:53 +11:00
ScrollLeft string ` yaml:"scrollLeft" `
ScrollRight string ` yaml:"scrollRight" `
2021-10-17 18:22:59 +01:00
GotoTop string ` yaml:"gotoTop" `
GotoBottom string ` yaml:"gotoBottom" `
2024-01-07 19:44:19 +11:00
ToggleRangeSelect string ` yaml:"toggleRangeSelect" `
RangeSelectDown string ` yaml:"rangeSelectDown" `
RangeSelectUp string ` yaml:"rangeSelectUp" `
2021-10-17 18:22:59 +01:00
PrevBlock string ` yaml:"prevBlock" `
NextBlock string ` yaml:"nextBlock" `
PrevBlockAlt string ` yaml:"prevBlock-alt" `
NextBlockAlt string ` yaml:"nextBlock-alt" `
NextBlockAlt2 string ` yaml:"nextBlock-alt2" `
PrevBlockAlt2 string ` yaml:"prevBlock-alt2" `
JumpToBlock [ ] string ` yaml:"jumpToBlock" `
NextMatch string ` yaml:"nextMatch" `
PrevMatch string ` yaml:"prevMatch" `
StartSearch string ` yaml:"startSearch" `
OptionMenu string ` yaml:"optionMenu" `
OptionMenuAlt1 string ` yaml:"optionMenu-alt1" `
Select string ` yaml:"select" `
GoInto string ` yaml:"goInto" `
Confirm string ` yaml:"confirm" `
2023-01-21 11:38:14 +00:00
ConfirmInEditor string ` yaml:"confirmInEditor" `
2021-10-17 18:22:59 +01:00
Remove string ` yaml:"remove" `
New string ` yaml:"new" `
Edit string ` yaml:"edit" `
OpenFile string ` yaml:"openFile" `
ScrollUpMain string ` yaml:"scrollUpMain" `
ScrollDownMain string ` yaml:"scrollDownMain" `
ScrollUpMainAlt1 string ` yaml:"scrollUpMain-alt1" `
ScrollDownMainAlt1 string ` yaml:"scrollDownMain-alt1" `
ScrollUpMainAlt2 string ` yaml:"scrollUpMain-alt2" `
ScrollDownMainAlt2 string ` yaml:"scrollDownMain-alt2" `
ExecuteCustomCommand string ` yaml:"executeCustomCommand" `
CreateRebaseOptionsMenu string ` yaml:"createRebaseOptionsMenu" `
2023-02-19 11:42:00 +11:00
Push string ` yaml:"pushFiles" ` // 'Files' appended for legacy reasons
Pull string ` yaml:"pullFiles" ` // 'Files' appended for legacy reasons
2021-10-17 18:22:59 +01:00
Refresh string ` yaml:"refresh" `
CreatePatchOptionsMenu string ` yaml:"createPatchOptionsMenu" `
NextTab string ` yaml:"nextTab" `
PrevTab string ` yaml:"prevTab" `
NextScreenMode string ` yaml:"nextScreenMode" `
PrevScreenMode string ` yaml:"prevScreenMode" `
Undo string ` yaml:"undo" `
Redo string ` yaml:"redo" `
FilteringMenu string ` yaml:"filteringMenu" `
DiffingMenu string ` yaml:"diffingMenu" `
DiffingMenuAlt string ` yaml:"diffingMenu-alt" `
CopyToClipboard string ` yaml:"copyToClipboard" `
OpenRecentRepos string ` yaml:"openRecentRepos" `
SubmitEditorText string ` yaml:"submitEditorText" `
ExtrasMenu string ` yaml:"extrasMenu" `
ToggleWhitespaceInDiffView string ` yaml:"toggleWhitespaceInDiffView" `
2021-09-11 20:42:23 +02:00
IncreaseContextInDiffView string ` yaml:"increaseContextInDiffView" `
2021-09-11 19:35:17 +02:00
DecreaseContextInDiffView string ` yaml:"decreaseContextInDiffView" `
2023-03-05 14:15:31 +01:00
OpenDiffTool string ` yaml:"openDiffTool" `
2020-10-04 09:53:56 +11:00
}
type KeybindingStatusConfig struct {
2020-11-27 16:07:14 +09:00
CheckForUpdate string ` yaml:"checkForUpdate" `
RecentRepos string ` yaml:"recentRepos" `
AllBranchesLogGraph string ` yaml:"allBranchesLogGraph" `
2020-10-04 09:53:56 +11:00
}
type KeybindingFilesConfig struct {
CommitChanges string ` yaml:"commitChanges" `
CommitChangesWithoutHook string ` yaml:"commitChangesWithoutHook" `
AmendLastCommit string ` yaml:"amendLastCommit" `
CommitChangesWithEditor string ` yaml:"commitChangesWithEditor" `
2023-08-01 14:54:56 +02:00
FindBaseCommitForFixup string ` yaml:"findBaseCommitForFixup" `
2023-08-25 08:50:05 -05:00
ConfirmDiscard string ` yaml:"confirmDiscard" `
2022-11-30 19:36:35 +11:00
IgnoreFile string ` yaml:"ignoreFile" `
2020-10-04 09:53:56 +11:00
RefreshFiles string ` yaml:"refreshFiles" `
StashAllChanges string ` yaml:"stashAllChanges" `
ViewStashOptions string ` yaml:"viewStashOptions" `
ToggleStagedAll string ` yaml:"toggleStagedAll" `
ViewResetOptions string ` yaml:"viewResetOptions" `
Fetch string ` yaml:"fetch" `
2021-03-21 08:41:06 +11:00
ToggleTreeView string ` yaml:"toggleTreeView" `
2021-04-11 10:05:39 +10:00
OpenMergeTool string ` yaml:"openMergeTool" `
2021-06-20 16:55:50 +02:00
OpenStatusFilter string ` yaml:"openStatusFilter" `
2023-11-02 23:31:38 +01:00
CopyFileInfoToClipboard string ` yaml:"copyFileInfoToClipboard" `
2020-10-04 09:53:56 +11:00
}
type KeybindingBranchesConfig struct {
CreatePullRequest string ` yaml:"createPullRequest" `
2021-04-21 15:23:36 +04:00
ViewPullRequestOptions string ` yaml:"viewPullRequestOptions" `
2020-11-10 14:57:50 -05:00
CopyPullRequestURL string ` yaml:"copyPullRequestURL" `
2020-10-04 09:53:56 +11:00
CheckoutBranchByName string ` yaml:"checkoutBranchByName" `
ForceCheckoutBranch string ` yaml:"forceCheckoutBranch" `
RebaseBranch string ` yaml:"rebaseBranch" `
RenameBranch string ` yaml:"renameBranch" `
MergeIntoCurrentBranch string ` yaml:"mergeIntoCurrentBranch" `
ViewGitFlowOptions string ` yaml:"viewGitFlowOptions" `
FastForward string ` yaml:"fastForward" `
2023-02-08 22:40:18 +09:00
CreateTag string ` yaml:"createTag" `
2020-10-04 09:53:56 +11:00
PushTag string ` yaml:"pushTag" `
SetUpstream string ` yaml:"setUpstream" `
FetchRemote string ` yaml:"fetchRemote" `
2023-12-20 15:38:05 +09:00
SortOrder string ` yaml:"sortOrder" `
2020-10-04 09:53:56 +11:00
}
2023-07-16 19:39:53 +10:00
type KeybindingWorktreesConfig struct {
ViewWorktreeOptions string ` yaml:"viewWorktreeOptions" `
}
2020-10-04 09:53:56 +11:00
type KeybindingCommitsConfig struct {
2022-03-24 21:04:33 +01:00
SquashDown string ` yaml:"squashDown" `
RenameCommit string ` yaml:"renameCommit" `
RenameCommitWithEditor string ` yaml:"renameCommitWithEditor" `
ViewResetOptions string ` yaml:"viewResetOptions" `
MarkCommitAsFixup string ` yaml:"markCommitAsFixup" `
CreateFixupCommit string ` yaml:"createFixupCommit" `
SquashAboveCommits string ` yaml:"squashAboveCommits" `
MoveDownCommit string ` yaml:"moveDownCommit" `
MoveUpCommit string ` yaml:"moveUpCommit" `
AmendToCommit string ` yaml:"amendToCommit" `
2022-04-22 16:01:30 +02:00
ResetCommitAuthor string ` yaml:"resetCommitAuthor" `
2022-03-24 21:04:33 +01:00
PickCommit string ` yaml:"pickCommit" `
RevertCommit string ` yaml:"revertCommit" `
CherryPickCopy string ` yaml:"cherryPickCopy" `
PasteCommits string ` yaml:"pasteCommits" `
2023-06-11 08:08:55 +02:00
MarkCommitAsBaseForRebase string ` yaml:"markCommitAsBaseForRebase" `
2023-02-20 18:52:45 +11:00
CreateTag string ` yaml:"tagCommit" `
2022-03-24 21:04:33 +01:00
CheckoutCommit string ` yaml:"checkoutCommit" `
ResetCherryPick string ` yaml:"resetCherryPick" `
CopyCommitAttributeToClipboard string ` yaml:"copyCommitAttributeToClipboard" `
OpenLogMenu string ` yaml:"openLogMenu" `
OpenInBrowser string ` yaml:"openInBrowser" `
ViewBisectOptions string ` yaml:"viewBisectOptions" `
2024-01-12 10:32:20 +11:00
StartInteractiveRebase string ` yaml:"startInteractiveRebase" `
2020-10-04 09:53:56 +11:00
}
type KeybindingStashConfig struct {
2022-10-14 22:19:53 +09:00
PopStash string ` yaml:"popStash" `
RenameStash string ` yaml:"renameStash" `
2020-10-04 09:53:56 +11:00
}
type KeybindingCommitFilesConfig struct {
CheckoutCommitFile string ` yaml:"checkoutCommitFile" `
}
type KeybindingMainConfig struct {
2024-01-07 19:44:19 +11:00
ToggleSelectHunk string ` yaml:"toggleSelectHunk" `
PickBothHunks string ` yaml:"pickBothHunks" `
EditSelectHunk string ` yaml:"editSelectHunk" `
2020-10-04 09:53:56 +11:00
}
type KeybindingSubmodulesConfig struct {
Init string ` yaml:"init" `
Update string ` yaml:"update" `
BulkMenu string ` yaml:"bulkMenu" `
}
2023-05-18 19:15:23 +02:00
type KeybindingCommitMessageConfig struct {
SwitchToEditor string ` yaml:"switchToEditor" `
}
2020-10-04 09:53:56 +11:00
// OSConfig contains config on the level of the os
type OSConfig struct {
2023-03-26 14:04:09 +02:00
// Command for editing a file. Should contain "{{filename}}".
Edit string ` yaml:"edit,omitempty" `
// Command for editing a file at a given line number. Should contain
// "{{filename}}", and may optionally contain "{{line}}".
EditAtLine string ` yaml:"editAtLine,omitempty" `
// Same as EditAtLine, except that the command needs to wait until the
// window is closed.
EditAtLineAndWait string ` yaml:"editAtLineAndWait,omitempty" `
2023-08-09 21:34:51 +10:00
// Whether lazygit suspends until an edit process returns
2023-03-26 14:04:09 +02:00
// Pointer to bool so that we can distinguish unset (nil) from false.
2023-08-09 21:34:51 +10:00
// We're naming this `editInTerminal` for backwards compatibility
SuspendOnEdit * bool ` yaml:"editInTerminal,omitempty" `
2023-03-26 14:04:09 +02:00
2023-07-17 15:45:10 +10:00
// For opening a directory in an editor
OpenDirInEditor string ` yaml:"openDirInEditor,omitempty" `
2023-03-26 14:04:09 +02:00
// A built-in preset that sets all of the above settings. Supported presets
// are defined in the getPreset function in editor_presets.go.
2023-09-30 02:47:06 +03:00
EditPreset string ` yaml:"editPreset,omitempty" jsonschema:"example=vim,example=nvim,example=emacs,example=nano,example=vscode,example=sublime,example=kakoune,example=helix,example=xcode" `
2023-03-26 14:04:09 +02:00
2023-03-28 18:00:40 +02:00
// Command for opening a file, as if the file is double-clicked. Should
// contain "{{filename}}", but doesn't support "{{line}}".
Open string ` yaml:"open,omitempty" `
// Command for opening a link. Should contain "{{link}}".
OpenLink string ` yaml:"openLink,omitempty" `
2023-03-26 14:04:09 +02:00
// --------
// The following configs are all deprecated and kept for backward
// compatibility. They will be removed in the future.
// EditCommand is the command for editing a file.
// Deprecated: use Edit instead. Note that semantics are different:
// EditCommand is just the command itself, whereas Edit contains a
// "{{filename}}" variable.
2021-05-19 23:44:58 -07:00
EditCommand string ` yaml:"editCommand,omitempty" `
2021-08-04 18:43:34 +09:00
// EditCommandTemplate is the command template for editing a file
2023-03-26 14:04:09 +02:00
// Deprecated: use EditAtLine instead.
2021-08-04 18:43:34 +09:00
EditCommandTemplate string ` yaml:"editCommandTemplate,omitempty" `
2020-10-04 09:53:56 +11:00
// OpenCommand is the command for opening a file
2023-03-28 18:00:40 +02:00
// Deprecated: use Open instead.
2020-10-04 09:53:56 +11:00
OpenCommand string ` yaml:"openCommand,omitempty" `
2023-03-29 11:50:35 +02:00
// OpenLinkCommand is the command for opening a link
2023-03-28 18:00:40 +02:00
// Deprecated: use OpenLink instead.
2020-10-04 09:53:56 +11:00
OpenLinkCommand string ` yaml:"openLinkCommand,omitempty" `
2023-07-16 08:57:02 +00:00
2023-09-30 14:52:44 +10:00
// CopyToClipboardCmd is the command for copying to clipboard.
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-clipboard
2023-07-16 08:57:02 +00:00
CopyToClipboardCmd string ` yaml:"copyToClipboardCmd,omitempty" `
2020-10-03 14:54:55 +10:00
}
2023-07-13 18:36:39 +10:00
type CustomCommandAfterHook struct {
CheckForConflicts bool ` yaml:"checkForConflicts" `
}
2020-10-03 14:54:55 +10:00
type CustomCommand struct {
2023-09-30 14:52:44 +10:00
// The key to trigger the command. Use a single letter or one of the values from https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md
Key string ` yaml:"key" `
// The context in which to listen for the key
2023-09-30 02:47:06 +03:00
Context string ` yaml:"context" jsonschema:"enum=status,enum=files,enum=worktrees,enum=localBranches,enum=remotes,enum=remoteBranches,enum=tags,enum=commits,enum=reflogCommits,enum=subCommits,enum=commitFiles,enum=stash,enum=global" `
2023-09-30 14:52:44 +10:00
// The command to run (using Go template syntax for placeholder values)
2023-09-30 02:47:06 +03:00
Command string ` yaml:"command" jsonschema:"example=git fetch {{ .Form .Remote }} {{ .Form .Branch }} && git checkout FETCH_HEAD" `
2023-09-30 14:52:44 +10:00
// If true, run the command in a subprocess (e.g. if the command requires user input)
Subprocess bool ` yaml:"subprocess" `
// A list of prompts that will request user input before running the final command
Prompts [ ] CustomCommandPrompt ` yaml:"prompts" `
// Text to display while waiting for command to finish
2023-09-30 02:47:06 +03:00
LoadingText string ` yaml:"loadingText" jsonschema:"example=Loading..." `
2023-09-30 14:52:44 +10:00
// Label for the custom command when displayed in the keybindings menu
Description string ` yaml:"description" `
// If true, stream the command's output to the Command Log panel
Stream bool ` yaml:"stream" `
// If true, show the command's output in a popup within Lazygit
ShowOutput bool ` yaml:"showOutput" `
// Actions to take after the command has completed
After CustomCommandAfterHook ` yaml:"after" `
2020-10-03 14:54:55 +10:00
}
2020-10-04 09:53:56 +11:00
type CustomCommandPrompt struct {
2023-09-30 14:52:44 +10:00
// One of: 'input' | 'menu' | 'confirm' | 'menuFromCommand'
Type string ` yaml:"type" `
// Used to reference the entered value from within the custom command. E.g. a prompt with `key: 'Branch'` can be referred to as `{{.Form.Branch}}` in the command
Key string ` yaml:"key" `
// The title to display in the popup panel
2020-10-04 09:53:56 +11:00
Title string ` yaml:"title" `
2023-09-30 14:52:44 +10:00
// The initial value to appear in the text box.
// Only for input prompts.
InitialValue string ` yaml:"initialValue" `
// Shows suggestions as the input is entered
// Only for input prompts.
Suggestions CustomCommandSuggestions ` yaml:"suggestions" `
2020-10-04 09:53:56 +11:00
2023-09-30 14:52:44 +10:00
// The message of the confirmation prompt.
// Only for confirm prompts.
2023-09-30 02:47:06 +03:00
Body string ` yaml:"body" jsonschema:"example=Are you sure you want to push to the remote?" `
2022-06-24 22:37:10 -07:00
2023-09-30 14:52:44 +10:00
// Menu options.
// Only for menu prompts.
2023-12-15 07:23:28 +03:00
Options [ ] CustomCommandMenuOption ` yaml:"options" `
2021-07-17 18:02:11 +01:00
2023-09-30 14:52:44 +10:00
// The command to run to generate menu options
// Only for menuFromCommand prompts.
2023-09-30 02:47:06 +03:00
Command string ` yaml:"command" jsonschema:"example=git fetch {{ .Form .Remote }} {{ .Form .Branch }} && git checkout FETCH_HEAD" `
2023-09-30 14:52:44 +10:00
// The regexp to run specifying groups which are going to be kept from the command's output.
// Only for menuFromCommand prompts.
2023-09-30 02:47:06 +03:00
Filter string ` yaml:"filter" jsonschema:"example=.* {{ .SelectedRemote .Name }} /(?P<branch>.*)" `
2023-09-30 14:52:44 +10:00
// How to format matched groups from the filter to construct a menu item's value.
// Only for menuFromCommand prompts.
2023-09-30 02:47:06 +03:00
ValueFormat string ` yaml:"valueFormat" jsonschema:"example= {{ .branch }} " `
2023-09-30 14:52:44 +10:00
// Like valueFormat but for the labels. If `labelFormat` is not specified, `valueFormat` is shown instead.
// Only for menuFromCommand prompts.
2023-09-30 02:47:06 +03:00
LabelFormat string ` yaml:"labelFormat" jsonschema:"example= {{ .branch | green }} " `
2020-10-04 09:53:56 +11:00
}
2023-05-29 22:46:18 +10:00
type CustomCommandSuggestions struct {
2023-09-30 14:52:44 +10:00
// Uses built-in logic to obtain the suggestions. One of 'authors' | 'branches' | 'files' | 'refs' | 'remotes' | 'remoteBranches' | 'tags'
2023-09-30 02:47:06 +03:00
Preset string ` yaml:"preset" jsonschema:"enum=authors,enum=branches,enum=files,enum=refs,enum=remotes,enum=remoteBranches,enum=tags" `
2023-09-30 14:52:44 +10:00
// Command to run such that each line in the output becomes a suggestion. Mutually exclusive with 'preset' field.
2023-09-30 02:47:06 +03:00
Command string ` yaml:"command" jsonschema:"example=git fetch {{ .Form .Remote }} {{ .Form .Branch }} && git checkout FETCH_HEAD" `
2023-05-29 22:46:18 +10:00
}
2020-10-04 09:53:56 +11:00
type CustomCommandMenuOption struct {
2023-09-30 14:52:44 +10:00
// The first part of the label
Name string ` yaml:"name" `
// The second part of the label
2020-10-04 09:53:56 +11:00
Description string ` yaml:"description" `
2023-09-30 14:52:44 +10:00
// The value that will be used in the command
2023-09-30 02:47:06 +03:00
Value string ` yaml:"value" jsonschema:"example=feature,minLength=1" `
2020-10-04 09:53:56 +11:00
}
func GetDefaultConfig ( ) * UserConfig {
return & UserConfig {
Gui : GuiConfig {
2023-04-17 17:32:10 +02:00
ScrollHeight : 2 ,
ScrollPastBottom : true ,
2023-08-09 18:34:43 +02:00
ScrollOffMargin : 2 ,
2023-08-17 09:58:16 +02:00
ScrollOffBehavior : "margin" ,
2023-04-17 17:32:10 +02:00
MouseEvents : true ,
SkipDiscardChangeWarning : false ,
SkipStashWarning : false ,
SidePanelWidth : 0.3333 ,
ExpandFocusedSidePanel : false ,
MainPanelSplitMode : "flexible" ,
2023-11-26 13:11:50 +01:00
EnlargedSideViewLocation : "left" ,
2023-04-17 17:32:10 +02:00
Language : "auto" ,
TimeFormat : "02 Jan 06" ,
ShortTimeFormat : time . Kitchen ,
2020-10-04 09:53:56 +11:00
Theme : ThemeConfig {
2023-06-03 14:11:03 +10:00
ActiveBorderColor : [ ] string { "green" , "bold" } ,
SearchingActiveBorderColor : [ ] string { "cyan" , "bold" } ,
InactiveBorderColor : [ ] string { "default" } ,
OptionsTextColor : [ ] string { "blue" } ,
SelectedLineBgColor : [ ] string { "blue" } ,
CherryPickedCommitBgColor : [ ] string { "cyan" } ,
CherryPickedCommitFgColor : [ ] string { "blue" } ,
2023-06-11 08:08:55 +02:00
MarkedBaseCommitBgColor : [ ] string { "yellow" } ,
MarkedBaseCommitFgColor : [ ] string { "blue" } ,
2023-06-03 14:11:03 +10:00
UnstagedChangesColor : [ ] string { "red" } ,
DefaultFgColor : [ ] string { "default" } ,
2020-10-04 09:53:56 +11:00
} ,
2023-07-11 13:48:18 +02:00
CommitLength : CommitLengthConfig { Show : true } ,
SkipNoStagedFilesWarning : false ,
ShowListFooter : true ,
ShowCommandLog : true ,
ShowBottomLine : true ,
2023-09-06 18:16:53 -07:00
ShowPanelJumps : true ,
2023-07-11 13:48:18 +02:00
ShowFileTree : true ,
ShowRandomTip : true ,
ShowIcons : false ,
NerdFontsVersion : "" ,
2024-01-12 13:16:25 +01:00
ShowFileIcons : true ,
2023-07-11 13:48:18 +02:00
ShowBranchCommitHash : false ,
CommandLogSize : 8 ,
SplitDiff : "auto" ,
SkipRewordInEditorWarning : false ,
2023-09-09 10:42:24 +02:00
Border : "rounded" ,
2023-08-01 16:57:37 +10:00
AnimateExplosion : true ,
2023-09-29 16:18:45 -04:00
PortraitMode : "auto" ,
2020-10-04 09:53:56 +11:00
} ,
Git : GitConfig {
Paging : PagingConfig {
2023-06-30 08:42:39 +02:00
ColorArg : "always" ,
Pager : "" ,
UseConfig : false ,
ExternalDiffCommand : "" ,
2022-03-19 09:38:49 +11:00
} ,
2021-11-14 14:31:15 +01:00
Commit : CommitConfig {
SignOff : false ,
} ,
2020-10-04 09:53:56 +11:00
Merging : MergingConfig {
ManualCommit : false ,
Args : "" ,
} ,
2021-11-02 20:05:23 +11:00
Log : LogConfig {
2022-05-30 23:19:48 +08:00
Order : "topo-order" ,
ShowGraph : "when-maximised" ,
2022-05-30 13:52:39 +08:00
ShowWholeGraph : false ,
2021-11-02 20:05:23 +11:00
} ,
2020-10-04 09:53:56 +11:00
SkipHookPrefix : "WIP" ,
2023-05-09 21:41:25 +02:00
MainBranches : [ ] string { "master" , "main" } ,
2020-10-04 09:53:56 +11:00
AutoFetch : true ,
2022-03-26 18:10:58 +01:00
AutoRefresh : true ,
2023-03-01 09:09:35 +01:00
FetchAll : true ,
2020-10-04 09:53:56 +11:00
BranchLogCmd : "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --" ,
2020-11-27 16:07:14 +09:00
AllBranchesLogCmd : "git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium" ,
2020-10-04 09:53:56 +11:00
DisableForcePushing : false ,
CommitPrefixes : map [ string ] CommitPrefixConfig ( nil ) ,
2021-07-16 14:06:01 +02:00
ParseEmoji : false ,
2020-10-04 09:53:56 +11:00
} ,
2021-01-05 18:38:49 +01:00
Refresher : RefresherConfig {
RefreshInterval : 10 ,
FetchInterval : 60 ,
} ,
2020-10-04 09:53:56 +11:00
Update : UpdateConfig {
Method : "prompt" ,
Days : 14 ,
} ,
ConfirmOnQuit : false ,
2021-04-06 09:23:47 +10:00
QuitOnTopLevelReturn : false ,
2020-10-04 09:53:56 +11:00
Keybinding : KeybindingConfig {
Universal : KeybindingUniversalConfig {
Quit : "q" ,
QuitAlt1 : "<c-c>" ,
Return : "<esc>" ,
QuitWithoutChangingDirectory : "Q" ,
TogglePanel : "<tab>" ,
PrevItem : "<up>" ,
NextItem : "<down>" ,
PrevItemAlt : "k" ,
NextItemAlt : "j" ,
PrevPage : "," ,
NextPage : "." ,
2021-11-02 20:35:53 +11:00
ScrollLeft : "H" ,
ScrollRight : "L" ,
2020-10-04 09:53:56 +11:00
GotoTop : "<" ,
GotoBottom : ">" ,
2024-01-07 19:44:19 +11:00
ToggleRangeSelect : "v" ,
RangeSelectDown : "<s-down>" ,
RangeSelectUp : "<s-up>" ,
2020-10-04 09:53:56 +11:00
PrevBlock : "<left>" ,
NextBlock : "<right>" ,
PrevBlockAlt : "h" ,
NextBlockAlt : "l" ,
2021-04-11 23:32:20 +10:00
PrevBlockAlt2 : "<backtab>" ,
NextBlockAlt2 : "<tab>" ,
2021-10-17 18:22:59 +01:00
JumpToBlock : [ ] string { "1" , "2" , "3" , "4" , "5" } ,
2020-10-04 09:53:56 +11:00
NextMatch : "n" ,
PrevMatch : "N" ,
StartSearch : "/" ,
2023-10-09 22:06:32 +03:00
OptionMenu : "<disabled>" ,
2020-10-04 09:53:56 +11:00
OptionMenuAlt1 : "?" ,
Select : "<space>" ,
GoInto : "<enter>" ,
Confirm : "<enter>" ,
2023-01-21 11:38:14 +00:00
ConfirmInEditor : "<a-enter>" ,
2020-10-04 09:53:56 +11:00
Remove : "d" ,
New : "n" ,
Edit : "e" ,
OpenFile : "o" ,
2021-05-27 16:22:33 +02:00
OpenRecentRepos : "<c-r>" ,
2020-10-04 09:53:56 +11:00
ScrollUpMain : "<pgup>" ,
ScrollDownMain : "<pgdown>" ,
ScrollUpMainAlt1 : "K" ,
ScrollDownMainAlt1 : "J" ,
ScrollUpMainAlt2 : "<c-u>" ,
ScrollDownMainAlt2 : "<c-d>" ,
ExecuteCustomCommand : ":" ,
CreateRebaseOptionsMenu : "m" ,
2023-02-19 11:42:00 +11:00
Push : "P" ,
Pull : "p" ,
2020-10-04 09:53:56 +11:00
Refresh : "R" ,
CreatePatchOptionsMenu : "<c-p>" ,
NextTab : "]" ,
PrevTab : "[" ,
NextScreenMode : "+" ,
PrevScreenMode : "_" ,
Undo : "z" ,
Redo : "<c-z>" ,
FilteringMenu : "<c-s>" ,
DiffingMenu : "W" ,
DiffingMenuAlt : "<c-e>" ,
CopyToClipboard : "<c-o>" ,
2020-10-13 08:16:24 +11:00
SubmitEditorText : "<enter>" ,
2021-04-11 12:12:54 +10:00
ExtrasMenu : "@" ,
2021-05-28 12:02:19 +02:00
ToggleWhitespaceInDiffView : "<c-w>" ,
2021-09-11 20:42:23 +02:00
IncreaseContextInDiffView : "}" ,
2021-09-11 19:35:17 +02:00
DecreaseContextInDiffView : "{" ,
2023-03-05 14:15:31 +01:00
OpenDiffTool : "<c-t>" ,
2020-10-04 09:53:56 +11:00
} ,
Status : KeybindingStatusConfig {
2020-11-27 16:07:14 +09:00
CheckForUpdate : "u" ,
RecentRepos : "<enter>" ,
AllBranchesLogGraph : "a" ,
2020-10-04 09:53:56 +11:00
} ,
Files : KeybindingFilesConfig {
CommitChanges : "c" ,
CommitChangesWithoutHook : "w" ,
AmendLastCommit : "A" ,
CommitChangesWithEditor : "C" ,
2023-08-01 14:54:56 +02:00
FindBaseCommitForFixup : "<c-f>" ,
2022-11-30 19:36:35 +11:00
IgnoreFile : "i" ,
2020-10-04 09:53:56 +11:00
RefreshFiles : "r" ,
StashAllChanges : "s" ,
ViewStashOptions : "S" ,
ToggleStagedAll : "a" ,
ViewResetOptions : "D" ,
Fetch : "f" ,
2021-03-21 08:41:06 +11:00
ToggleTreeView : "`" ,
2021-04-11 10:05:39 +10:00
OpenMergeTool : "M" ,
2021-06-20 16:55:50 +02:00
OpenStatusFilter : "<c-b>" ,
2023-08-25 08:50:05 -05:00
ConfirmDiscard : "x" ,
2023-11-02 23:31:38 +01:00
CopyFileInfoToClipboard : "y" ,
2020-10-04 09:53:56 +11:00
} ,
Branches : KeybindingBranchesConfig {
2020-11-17 22:08:32 -05:00
CopyPullRequestURL : "<c-y>" ,
2020-10-04 09:53:56 +11:00
CreatePullRequest : "o" ,
2021-04-21 15:23:36 +04:00
ViewPullRequestOptions : "O" ,
2020-10-04 09:53:56 +11:00
CheckoutBranchByName : "c" ,
ForceCheckoutBranch : "F" ,
RebaseBranch : "r" ,
RenameBranch : "R" ,
MergeIntoCurrentBranch : "M" ,
ViewGitFlowOptions : "i" ,
FastForward : "f" ,
2023-02-08 22:40:18 +09:00
CreateTag : "T" ,
2020-10-04 09:53:56 +11:00
PushTag : "P" ,
SetUpstream : "u" ,
FetchRemote : "f" ,
2023-12-20 15:38:05 +09:00
SortOrder : "s" ,
2020-10-04 09:53:56 +11:00
} ,
2023-07-16 19:39:53 +10:00
Worktrees : KeybindingWorktreesConfig {
ViewWorktreeOptions : "w" ,
} ,
2020-10-12 11:13:19 +03:00
Commits : KeybindingCommitsConfig {
2022-03-24 21:04:33 +01:00
SquashDown : "s" ,
RenameCommit : "r" ,
RenameCommitWithEditor : "R" ,
ViewResetOptions : "g" ,
MarkCommitAsFixup : "f" ,
CreateFixupCommit : "F" ,
SquashAboveCommits : "S" ,
MoveDownCommit : "<c-j>" ,
MoveUpCommit : "<c-k>" ,
AmendToCommit : "A" ,
2022-04-22 16:01:30 +02:00
ResetCommitAuthor : "a" ,
2022-03-24 21:04:33 +01:00
PickCommit : "p" ,
RevertCommit : "t" ,
2024-01-13 17:40:28 +11:00
CherryPickCopy : "C" ,
PasteCommits : "V" ,
2023-06-11 08:08:55 +02:00
MarkCommitAsBaseForRebase : "B" ,
2023-02-20 18:52:45 +11:00
CreateTag : "T" ,
2022-03-24 21:04:33 +01:00
CheckoutCommit : "<space>" ,
ResetCherryPick : "<c-R>" ,
CopyCommitAttributeToClipboard : "y" ,
OpenLogMenu : "<c-l>" ,
OpenInBrowser : "o" ,
ViewBisectOptions : "b" ,
2024-01-12 10:32:20 +11:00
StartInteractiveRebase : "i" ,
2020-10-04 09:53:56 +11:00
} ,
Stash : KeybindingStashConfig {
2022-10-14 22:19:53 +09:00
PopStash : "g" ,
RenameStash : "r" ,
2020-10-04 09:53:56 +11:00
} ,
CommitFiles : KeybindingCommitFilesConfig {
CheckoutCommitFile : "c" ,
} ,
Main : KeybindingMainConfig {
2024-01-07 19:44:19 +11:00
ToggleSelectHunk : "a" ,
PickBothHunks : "b" ,
EditSelectHunk : "E" ,
2020-10-04 09:53:56 +11:00
} ,
Submodules : KeybindingSubmodulesConfig {
Init : "i" ,
Update : "u" ,
BulkMenu : "b" ,
} ,
2023-05-18 19:15:23 +02:00
CommitMessage : KeybindingCommitMessageConfig {
SwitchToEditor : "<c-o>" ,
} ,
2020-10-04 09:53:56 +11:00
} ,
2023-03-29 11:42:37 +02:00
OS : OSConfig { } ,
2022-03-17 17:43:03 +11:00
DisableStartupPopups : false ,
CustomCommands : [ ] CustomCommand ( nil ) ,
Services : map [ string ] string ( nil ) ,
NotARepository : "prompt" ,
PromptToReturnFromSubprocess : true ,
2020-10-04 09:53:56 +11:00
}
2020-10-03 14:54:55 +10:00
}