Add to chat context not working for .env files

Describe the Bug

Tried to highlight a couple of lines in a .env file, and hit CMD+L to add it as context to the chat panel.

The panel opens and the cursor focuses into the chat input, but the context lines are not added to the context for the chat.

Steps to Reproduce

  • Open a .env file
  • Highlight a couple lines
  • Either click “Add to Chat” in the popup next to the highlight, or hit CMD+L

Expected Behavior

Should add the lines as context to the chat

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.2 (Universal)
VSCode Version: 1.99.3
Commit: faa03b17cce93e8a80b7d62d57f5eda6bb6ab9f0
Date: 2025-07-07T06:07:27.002Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, env files are ignored by default in Cursor. You can try removing it from the global ignore list.

Ah.. that did it. Thanks!

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.