opencode
opencode copied to clipboard
Add native config option to include gitignored files in search
Summary
Previous issues #1535 and #2517 requested the ability to include gitignored files in search results. They were closed with workarounds (RIPGREP_CONFIG_PATH, .ignore files).
This proposes a native respect_gitignore config option for a cleaner UX.
Proposed Solution
Add a respect_gitignore boolean config option:
{
"respect_gitignore": false
}
- Default:
true(current behavior, respects .gitignore) - When
false: includes gitignored files in glob/grep/ls results
Benefits over workarounds
- No extra files (
.ignore,.rgrc) needed - No environment variables required
- Discoverable in config schema
- Consistent across all search tools (glob, grep, ls)
Use Cases
- Debugging build outputs or generated code
- Referencing LLM-specific docs/plans not committed to repo
- Working with vendored dependencies
- Inspecting files in directories like
node_modules