cursor
Public

The AI Code Editor

Files explicitly allowlisted in `.cursorindexingignore` are not indexed (e.g. .env, .prisma, .sql, package.json)#3063

Open
Opened 4/27/20250 commentsby developerisnow
developerisnow

Certain files that are explicitly allowlisted in `.cursorindexingignore` using `!` rules are not being indexed by Cursor, even though they exist on disk and are not ignored by `.gitignore` or `.cursorignore`. This prevents me from using Cursor’s codebase features as expected for these files. --- **How to Reproduce:** 1. **Project structure (anonymized):** ``` <project_root>/ .cursorindexingignore .gitignore .cursorignore <project_name>/ package.json .env prisma/ schema.prisma migrations/ 20250314063259_init/ migration.sql _examples/ some.json ``` 2. **.cursorindexingignore contents:** ``` <project_name>/* !<project_name>/.env !<project_name>/prisma/migrations/20250314063259_init/migration.sql !<project_name>/prisma/schema.prisma !<project_name>/package.json !<project_name>/_examples/* !<project_name>/.cursor/rules/* ``` 3. **.gitignore and .cursorignore:** - Both files are empty or do **not** contain any rules that would ignore the above files. 4. **Files exist on disk:** - All the allowlisted files (e.g. `.env`, `package.json`, `.prisma`, `.sql`, `.json`) are present and readable. 5. **Open the project in Cursor, wait for indexing to complete.** 6. **Check `embeddable_files.txt`:** - Only a few files (or none) from the allowlist appear in the index, while most are missing. --- **Expected Behavior:** All files explicitly allowlisted in `.cursorindexingignore` (using `!`) and not ignored by `.gitignore` or `.cursorignore` should be indexed and appear in `embeddable_files.txt`. **Actual Behavior:** Most allowlisted files (e.g. `.env`, `package.json`, `.prisma`, `.sql`, `.json`) are **not** indexed and do **not** appear in `embeddable_files.txt`, even after restarting Cursor and double-checking ignore files. --- **Minimal Repro Example:** 1. Create a test folder and file: ```bash mkdir -p test-cursor-index echo "hello" > test-cursor-index/should_be_indexed.txt ``` 2. Add to `.cursorindexingignore`: ``` test-cursor-index/* !test-cursor-index/should_be_indexed.txt ``` 3. Ensure `.gitignore` and `.cursorignore` do not ignore this file. 4. Open project in Cursor, wait for indexing. 5. Check `embeddable_files.txt`: ``` grep "test-cursor-index/should_be_indexed.txt" "$HOME/Library/Application Support/Cursor/User/workspaceStorage"/*/anysphere.cursor-retrieval/embeddable_files.txt ``` - The file **does** appear in the index (minimal example works). - But for real project files (see above), they **do not**. --- **Screenshots / Logs:** - Output of debug script showing missing files in `embeddable_files.txt` - Directory listing showing files exist on disk --- **System Info:** - **OS:** macOS (Sequoia 15.3.2) - **Cursor version:** (please specify, e.g. 0.49.6) --- **Does this block you from using Cursor?** Yes, it prevents me from using Cursor’s codebase features for key project files. --- **Additional Notes:** - I have double-checked that the files are not ignored by `.gitignore` or `.cursorignore`. - I have restarted Cursor and reloaded the project multiple times. - The issue persists for files like `.env`, `package.json`, `.prisma`, `.sql`, and `.json` in `<project_name>`. - The minimal test case works, but real project files are not indexed. --- **Links:** - [Cursor Ignore Files Documentation](https://docs.cursor.com/context/ignore-files) - [Cursor Forum Bug Reports](https://forum.cursor.com/c/bug-report/6) - [GitHub Issues](https://github.com/getcursor/cursor/issues) --- **Thank you for looking into this!**

AI Analysis

This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by developerisnow and has received 0 comments.

Add a comment
Comment form would go here