Having Cursor index the whole codebase when 99.9% of the files aren’t relevant at the moment doesn’t seem ideal.
I mostly use a single large workspace for convenience, but each file is usually a standalone script.
If a file is needed for what I’m working on it will be open in a tab, so I wanted a way to limit indexing to open files only.
I couldn’t find a way to do this, or any existing extension so I decided to make one!
The implementation is super simple. The extension adds a toggle to modify .cursorindexignore to exclude all files except open ones.
It’s not clear how quickly the index is updated, but Resync Index can be used if necessary.
Unopened files can still be referenced as usual using @.
Advanced Settings
By default, Cursor will index all files in your codebase…
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.
Working with large monorepos
When working with large monorepos containing hundreds of thousands of files, it’s important to be strategic about what gets indexed…
Disclaimer: This is my first attempt at an extension and I don’t have a clue what I’m doing!
Feedback, and contributions are welcomed…