{"record":{"id":"adf4eb589bacf2ec","repo":"jesseduffield/lazygit","slug":"git-diffrenderers-command-must-be-specified-for","errorCode":null,"errorMessage":"git.diffRenderers: 'command' must be specified for diff renderer type 'stdinFilter'.","messagePattern":"git\\.diffRenderers: 'command' must be specified for diff renderer type 'stdinFilter'\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/user_config_validation.go","lineNumber":118,"sourceCode":"func validateSpinner(spinner SpinnerConfig) error {\n\tif len(spinner.Frames) == 0 {\n\t\treturn errors.New(\"gui.spinner.frames must not be empty.\")\n\t}\n\tfirstWidth := utils.StringWidth(spinner.Frames[0])\n\tif lo.SomeBy(spinner.Frames, func(frame string) bool {\n\t\treturn utils.StringWidth(frame) != firstWidth\n\t}) {\n\t\treturn errors.New(\"All gui.spinner.frames entries must have the same width.\")\n\t}\n\treturn nil\n}\n\nfunc validateDiffRenderers(diffRenderers []DiffRendererConfig) error {\n\tfor _, diffRenderer := range diffRenderers {\n\t\tswitch diffRenderer.Type {\n\t\tcase \"stdinFilter\", \"\":\n\t\t\tif diffRenderer.Command == \"\" {\n\t\t\t\treturn errors.New(\"git.diffRenderers: 'command' must be specified for diff renderer type 'stdinFilter'.\")\n\t\t\t}\n\t\t\tif len(diffRenderer.Args) > 0 {\n\t\t\t\treturn errors.New(\"git.diffRenderers: 'args' cannot be used with diff renderer type 'stdinFilter'.\")\n\t\t\t}\n\t\tcase \"extDiff\":\n\t\t\tif len(diffRenderer.Args) > 0 {\n\t\t\t\treturn errors.New(\"git.diffRenderers: 'args' cannot be used with diff renderer type 'extDiff'.\")\n\t\t\t}\n\t\tcase \"rawGit\":\n\t\t\tif diffRenderer.Command != \"\" {\n\t\t\t\treturn errors.New(\"git.diffRenderers: 'command' cannot be used with diff renderer type 'rawGit'.\")\n\t\t\t}\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"git.diffRenderers: unknown type '%s'. Allowed values: stdinFilter, extDiff, rawGit\", diffRenderer.Type)\n\t\t}\n\t}\n\treturn nil\n}","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/config/user_config_validation.go#L100-L136","documentation":"Validation error from validateDiffRenderers (user_config_validation.go:118). A diff renderer entry with type 'stdinFilter' (the default when type is empty) must specify 'command' — the external filter program that reads a git diff on stdin and writes the rendered output. Without a command there is nothing to execute, so config load fails.","triggerScenarios":"Adding a git.diffRenderers entry with type stdinFilter (or omitting type) and no command field, e.g. 'diffRenderers: [{type: stdinFilter}]'. Validation runs at startup before the GUI appears.","commonSituations":"Configuring delta/difftastic as a stdin filter and forgetting the command; YAML indentation putting command at the wrong nesting level so the field is never set.","solutions":["Add the 'command' field naming the filter executable, e.g. command: delta","Verify the executable is on PATH with 'which delta'","If you wanted lazygit's raw git diff instead, set type: rawGit and remove command","Check YAML indentation so command sits under the correct list item"],"exampleFix":"# before\ngit:\n  diffRenderers:\n    - type: stdinFilter\n\n# after\ngit:\n  diffRenderers:\n    - type: stdinFilter\n      command: delta","handlingStrategy":"validation","validationCode":"function diffRendererEntryValid(e DiffRendererEntry) string | null {\n    if (e.type === \"stdinFilter\" || e.type === \"\") && !e.command) return \"stdinFilter needs command\";\n    return null;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair type: stdinFilter with a command","Confirm the filter binary exists on PATH ('which delta')","Watch YAML indentation: command must be a sibling of type under the same item"],"tags":["config","validation","diff","yaml"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}