iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🔥

Including Autocomplete-Excluded Files in Claude Code

に公開

When you type @ in Claude Code, it provides autocomplete suggestions for managed file names.

However, for example, files that are .gitignored or files under the .github directory are excluded from the search suggestions and do not appear. There are GitHub Actions workflow files and others under .github, and it's normal to want to edit these with Claude Code.

While I was worrying about this, I received a hint on Twitter (now X).

Thank you, @budougumi0617!

Remedy

Create a file called .rgignore in the root directory and "un-exclude" the exclusions as follows.

!.github/

Details

It seems that Claude Code uses ripgrep for search processing.

By "un-excluding" files that are excluded in ripgrep's default settings for Claude Code, they become available.

Refer to the detailed documentation below.

Discussion