[PR #48] [CLOSED] Adding "ignore folder" configuration #9517

Closed
opened 2026-02-16 18:13:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/48
Author: @davidturissini
Created: 5/21/2025
Status: Closed

Base: devHead: feature/configurable-skip-directories


📝 Commits (2)

📊 Changes

3 files changed (+18 additions, -2 deletions)

View changed files

📝 README.md (+5 -2)
📝 internal/config/config.go (+7 -0)
📝 internal/fileutil/fileutil.go (+6 -0)

📄 Description

Today,opencode has a hard coded list of "common" folders that it skips when greping a code base. This PR exposes "ignored" folders as a configuration so users can have control over which folders opencode skips.

Configuration

{
  "ignore": {
    "folders": ["path/to/ignored-folder"]
  }
}

There doesn't seem to be any tests for this, so I didn't add any but I did verify that the configuration is being loaded correctly.

If this is accepted, it would probably be desirable to move commonIgnoredDirs closer to the configuration parsing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/48 **Author:** [@davidturissini](https://github.com/davidturissini) **Created:** 5/21/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feature/configurable-skip-directories` --- ### 📝 Commits (2) - [`ef4033d`](https://github.com/anomalyco/opencode/commit/ef4033d44199c60eaf8aa9a3d245e8ebdf704b50) adding ignore configuration - [`96b1112`](https://github.com/anomalyco/opencode/commit/96b1112b9536b3cb373f55bd03eb186d7fecff30) formatting ### 📊 Changes **3 files changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+5 -2) 📝 `internal/config/config.go` (+7 -0) 📝 `internal/fileutil/fileutil.go` (+6 -0) </details> ### 📄 Description Today,`opencode` has a hard coded list of "common" folders that it skips when greping a code base. This PR exposes "ignored" folders as a configuration so users can have control over which folders `opencode` skips. ### Configuration ```json { "ignore": { "folders": ["path/to/ignored-folder"] } } ``` There doesn't seem to be any tests for this, so I didn't add any but I did verify that the configuration is being loaded correctly. If this is accepted, it would probably be desirable to move `commonIgnoredDirs` closer to the configuration parsing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:41 -05:00
yindo closed this issue 2026-02-16 18:13:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9517