jesseduffield/lazygit · error
git.diffRenderers: 'args' cannot be used with diff renderer
Error message
git.diffRenderers: 'args' cannot be used with diff renderer type 'extDiff'.
What it means
Validation error from validateDiffRenderers (user_config_validation.go:125). For type 'extDiff' (external whole-file diff tool, mirroring git's extDiff config), lazygit does not support per-entry args — the tool is invoked like git's difftool and must be configured via its own config file or a wrapper script. A non-empty args list fails config validation.
Source
Thrown at pkg/config/user_config_validation.go:125
}) {
return errors.New("All gui.spinner.frames entries must have the same width.")
}
return nil
}
func validateDiffRenderers(diffRenderers []DiffRendererConfig) error {
for _, diffRenderer := range diffRenderers {
switch diffRenderer.Type {
case "stdinFilter", "":
if diffRenderer.Command == "" {
return errors.New("git.diffRenderers: 'command' must be specified for diff renderer type 'stdinFilter'.")
}
if len(diffRenderer.Args) > 0 {
return errors.New("git.diffRenderers: 'args' cannot be used with diff renderer type 'stdinFilter'.")
}
case "extDiff":
if len(diffRenderer.Args) > 0 {
return errors.New("git.diffRenderers: 'args' cannot be used with diff renderer type 'extDiff'.")
}
case "rawGit":
if diffRenderer.Command != "" {
return errors.New("git.diffRenderers: 'command' cannot be used with diff renderer type 'rawGit'.")
}
default:
return fmt.Errorf("git.diffRenderers: unknown type '%s'. Allowed values: stdinFilter, extDiff, rawGit", diffRenderer.Type)
}
}
return nil
}
func validateEnum(name string, value string, allowedValues []string) error {
if slices.Contains(allowedValues, value) {
return nil
}
allowedValuesStr := strings.Join(allowedValues, ", ")
return fmt.Errorf("Unexpected value '%s' for '%s'. Allowed values: %s", value, name, allowedValuesStr)View on GitHub (pinned to c477a2959b)
Solutions
- Create a small wrapper script that invokes the tool with the flags, and set command to the wrapper path
- Or configure the tool's own config file (delta: ~/.gitconfig-delta; difftastic: env vars) to carry the options
- Remove the args field and restart lazygit
Example fix
# before
git:
diffRenderers:
- type: extDiff
command: meld
args: ['--newtab']
# after
# ~/bin/meld-wrap: exec meld --newtab "$@"
git:
diffRenderers:
- type: extDiff
command: ~/bin/meld-wrap Defensive patterns
Strategy: validation
Validate before calling
func extDiffHasNoArgs(e DiffRendererConfig) bool {
return e.Type == "extDiff" && len(e.Args) == 0
} Prevention
- Wrap flag-heavy diff tools in a shell script and point command at it
- Configure tool flags in the tool's own config, not lazygit's args
- Keep extDiff entries to type+command only
When it happens
Trigger: A git.diffRenderers entry with type extDiff and an args list, e.g. type: extDiff, command: meld, args: ['--newtab'].
Common situations: Porting a .gitconfig difftool entry that used cmd with flags into lazygit's structured fields; wanting to pass flags to meld/kdiff3/difftastic.
Related errors
- git.diffRenderers: 'command' must be specified for diff rend
- git.diffRenderers: 'args' cannot be used with diff renderer
- git.diffRenderers: 'command' cannot be used with diff render
- gui.sidePanels: a side panel must have at least one tab.
- gui.sidePanels must not be empty.
AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15).
Data as JSON: /api/errors/e90797f252c79fe0.
Report an issue: GitHub.