Add include option for file indexing

It would be great to have an option to explicitly list file or directory paths to include for indexing, particularly for a very large directory structure where relevant files may be scattered across several deeply-nested subdirectories.

One use case would be to run a linux command to invoke a tool with strace and capture the list of files that are accessed in the process. A project can then reference this list in an include file for indexing, and other directories may be additionally added as needed (obeying any existing ignore files).

EDIT: I just saw an equivalent pattern is to exclude all files using * then selectively undo using !.

1 Like

Following up on the exclude syntax, I hit a couple issues relating to my experimental use case:

  1. The common root of the filesystem path has admin-only permissions so a .cursorignore file can’t be added there, and even if it did have permissions it couldn’t be used for any project-specific includes.
  2. Subdirectories on separate mount points don’t show up if not automounted when opening the root path in Cursor through SSH. In linux doing ‘cd’ into the subdir would invoke automount so it would become visible afterwards when doing ‘ls’ on the root.

A way to provide absolute/full paths in a file to Cursor to use for setting up a project directory tree for indexing and inclusion would resolve the above issues, other than manually using File->Add Folder to Workspace.