Skip to content
Shell
4.3 KB
Raw Blame
# ============================================
# Lazygit Configuration
# ============================================

gui:
  # Theme - matches tmux/yazi
  theme:
    activeBorderColor:
      - "#39AFE6"
      - bold
    inactiveBorderColor:
      - "#3b4261"
    optionsTextColor:
      - "#7aa2f7"
    selectedLineBgColor:
      - "#24283b"
    selectedRangeBgColor:
      - "#24283b"
    cherryPickedCommitBgColor:
      - "#bb9af7"
    cherryPickedCommitFgColor:
      - "#1a1b26"
    unstagedChangesColor:
      - "#f7768e"
    defaultFgColor:
      - "#c0caf5"
    searchingActiveBorderColor:
      - "#e0af68"
  # Show icons (needs nerd font)
  nerdFontsVersion: "3"
  # Show file icons
  showFileIcons: true
  # Border style
  border: rounded
  # Show bottom line with keybindings
  showBottomLine: true
  # Show random tip
  showRandomTip: false
  # Show command log
  showCommandLog: false
  # Side panel width
  sidePanelWidth: 0.3
  # Expand focused side panel
  expandFocusedSidePanel: true
  # Main panel split mode (horizontal/vertical)
  mainPanelSplitMode: "flexible"
git:
  # Auto-fetch every 60 seconds
  autoFetch: true
  autoFetchInterval: 60
  # Pull with rebase by default
  pull:
    mode: "rebase"
  # Log options
  log:
    order: "topo-order"
    showGraph: "always"
    showWholeGraph: false
  # Diff options
  pagers:
    - colorArg: always
      pager: ""
  # Skip hook warning (careful with this)
  skipHookPrefix: "WIP"
  # Parse emoji in commit messages
  parseEmoji: true
os:
  # Open URLs in default browser
  openCommand: "open {{filename}}"
  # Edit in default editor
  editCommand: ""
  editCommandTemplate: ""
refresher:
  # Refresh rate
  refreshInterval: 10
  fetchInterval: 60
update:
  # Check for updates
  method: "prompt"
  days: 14
# Keybindings (keeping most defaults, adding useful ones)
keybinding:
  universal:
    quit: "q"
    quit-alt1: "<c-c>"
    return: "<esc>"
    togglePanel: "<tab>"
    prevItem: "<up>"
    nextItem: "<down>"
    prevPage: ","
    nextPage: "."
    scrollLeft: "H"
    scrollRight: "L"
    gotoTop: "<"
    gotoBottom: ">"
    prevBlock: "<left>"
    nextBlock: "<right>"
    nextMatch: "n"
    prevMatch: "N"
    startSearch: "/"
    optionMenu: "?"
    edit: "e"
    openFile: "o"
    copyToClipboard: "y"
    submitEditorText: "<enter>"
    extrasMenu: "@"
  commits:
    squashDown: "s"
    renameCommit: "r"
    renameCommitWithEditor: "R"
    viewResetOptions: "g"
    markCommitAsFixup: "f"
    createFixupCommit: "F"
    squashAboveCommits: "S"
    moveDownCommit: "<c-j>"
    moveUpCommit: "<c-k>"
    amendToCommit: "A"
    resetCommitAuthor: "a"
    pickCommit: "p"
    revertCommit: "t"
    cherryPickCopy: "C"
    pasteCommits: "V"
    tagCommit: "T"
    checkoutCommit: "<space>"
    copyCommitAttributeToClipboard: "y"
    openLogMenu: "<c-l>"
    openInBrowser: "o"
    viewBisectOptions: "b"
    startInteractiveRebase: "i"
  branches:
    createPullRequest: "O"
    viewPullRequestOptions: "o"
    checkoutBranchByName: "c"
    forceCheckoutBranch: "F"
    rebaseBranch: "r"
    renameBranch: "R"
    mergeIntoCurrentBranch: "M"
    viewGitFlowOptions: "g"
    fastForward: "f"
    createTag: "T"
    pushTag: "P"
    setUpstream: "u"
    fetchRemote: "f"
  files:
    commitChanges: "c"
    commitChangesWithoutHook: "w"
    amendLastCommit: "A"
    commitChangesWithEditor: "C"
    findBaseCommitForFixup: "<c-f>"
    confirmDiscard: "d"
    ignoreFile: "i"
    refreshFiles: "r"
    stashAllChanges: "s"
    viewStashOptions: "S"
    toggleStagedAll: "a"
    viewResetOptions: "D"
    fetch: "f"
    toggleTreeView: "`"
    openMergeOptions: "M"
    openStatusFilter: "<c-b>"
    copyFileInfoToClipboard: "y"
  stash:
    popStash: "g"
    renameStash: "r"
# Custom commands (add your workflows)
customCommands:
  # Quick push to current branch
  - key: "P"
    context: "files"
    command: "git push -u origin $(git branch --show-current)"
    description: "Push to origin"
  # Create PR (opens browser)
  - key: "<c-p>"
    context: "localBranches"
    command: "gh pr create --web"
    description: "Create PR on GitHub"
  # Open repo in browser
  - key: "O"
    context: "files"
    command: "gh repo view --web"
    description: "Open repo in browser"
  # Fetch and prune
  - key: "<c-f>"
    context: "localBranches"
    command: "git fetch --all --prune"
    description: "Fetch all and prune"