Cody Ignore
This guide will walk you through the process of ignoring specific files or folders in your codebase when using Cody.
Enabling Unstable Features
To use the ignore context feature, you first need to enable unstable features in Cody. Here's how:
- Open your settings in Cody Extension
- Next go to the
settings.jsonfile - Add a new line:
"cody.unstableFeatures": true.
This will enable experimental features, including the ignore context feature.
Using the Ignore Context Feature
To ignore specific files or folders from the context taken by Cody, you need to create a ignore file in your project. Here's how:
- Create a new folder in your project root named
.cody. - Inside the
.codyfolder, create a file namedignore. - In the
ignorefile, specify the files or folders you want to ignore.
The .codyignore file works similarly to a .gitignore file. If you want to ignore a file named secret.json, you would add secret.json to your .codyignore file. If you're going to ignore a folder called lib/shared, you would add lib/shared/ to your .codyignore file.
Once a file or folder is added to the .codyignore file, Cody will no longer provide autocomplete suggestions for that file or folder, and it will not appear in your chat results.