Cursor Indexing Limiter (extension)

Having Cursor index the whole codebase when 99.9% of the files aren’t relevant at the moment doesn’t seem ideal. :man_shrugging:

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! :face_with_tears_of_joy:

Feedback, and contributions are welcomed…

not sure if you really need that extension. you can just add .cursorindexingignore (same format as .gitignore)

Yes, if you have a fixed list of files to ignore you can just add them manually.

The point of this is to automatically create or modify .cursorindexingignore to limit indexing to open tabs (I usually have ~10-15).

If you already have a .cursorindexingignore file it’s backed up, and restored when toggling to full indexing.
420554019-e3a93ac9-a8bf-446a-8c51-96b8f1bb210f

Also, I really wish the codebase index was more informative.
image

  • How large is the index?
  • How many files are indexed?
  • What is the timestamp for the sync completion?
  • How many embeddings are there? etc
  • There’s plenty of UI space, but even a tooltip would suffice.