Codebase Indexing
Index your Codebase
For better and more accurate codebase answers using @codebase
or Ctrl/⌘ Enter
, you can index your codebase. Behind the scenes, Cursor
computes embeddings for each file in your codebase, and will use these to improve the accuracy of your codebase answers.
Your codebase index will automatically synchronize with your latest codebase changes.
The status of your codebase indexing is under Cursor Settings
> Features
> Codebase Indexing
.
![](https://mintlify.s3-us-west-1.amazonaws.com/anysphere/images/chat/codebase-indexing.png)
Advanced Settings
By default, Cursor will index all files in your codebase if privacy mode is not enabled.
You can also expand the Show Settings
section to access more advanced options.
Here, you can decide whether you want to enable automatic indexing for new repositories and configure the files
that Cursor will ignore during repository indexing, in addition to your .gitignore settings.
If you have any large content files in your project that the AI definitely doesn’t need to read, ignoring those files could improve the accuracy of the answers.