In this categoryCursor · 26
- How to Install Cursor and Import VS Code Settings (6 Minutes)Start
- Cursor Setup Guide: From Install to Your First AI Edit
- How to Set Up Project Rules in the .cursor/rules Folder
- How to Set Up Codebase Indexing in Cursor
- How to Enforce Project Conventions with Cursor Rules
- How to Write a Team Rule That Applies Only to Certain Files
- How to Migrate a Legacy .cursorrules File to the New Rules Folder
- How to Use Cursor Rules to Guide AI Edits
- How to Set Project Rules in Cursor
- How to Add a .cursorrules File to Steer Cursor
- How to Customize Cursor Keyboard Shortcuts
- How to Edit Multiple Files at Once with Cursor Composer
- How to Use Cursor Tab Completion Effectively
- How to Edit Code Inline with Cmd+K in Cursor
- How to Add Context to Cursor Chat with @ Mentions
- How to Choose and Switch AI Models in Cursor
- How to Add Library Docs as Context with @Docs in Cursor
- How to Generate and Maintain Tests with Cursor Composer
- How to Undo a Composer Change with Checkpoints in Cursor
- How to Use Cursor Agent Mode to Build a Feature End to End
- How to Connect an MCP Server to Cursor
- How to Refactor Across Your Whole Codebase in Cursor
- How to Query Your Database from Cursor with a Postgres MCP Server
- How to Let Cursor Run Commands Automatically (and Keep It Safe)
- How to Build a Full Feature Across Frontend and Backend with Composer
- How to Debug an MCP Server That Will Not Connect in Cursor
How to Add Context to Cursor Chat with @ Mentions
Pull files, folders, symbols, docs and the web into a request with @ so the model answers about your actual code.
The single biggest lever on answer quality in Cursor is context: what the model can see. The @ menu lets you attach exactly the right files, symbols, folders, documentation or web pages to a request. This guide covers the most useful @ sources and when to reach for each.
What you need
- Cursor open on a real project
- A question that depends on your code, not general knowledge
- A few minutes to learn the @ sources
Step 1: Open the @ menu
In the chat input, type @ to open the context menu. As you keep typing, it filters to matching files, folders and symbols. Pick one to attach it as a context chip on the message.
Step 2: Attach files, folders and symbols
Use @file to add a whole file, @folder to add a directory of related code, and @ a symbol name to add just that function or type. Attaching a focused symbol is often better than a whole file because it keeps the context tight.
| Mention | Adds | Use when |
|---|---|---|
| @File | One file's contents | The change lives in that file |
| @Folder | A directory of files | You need a feature's whole context |
| @Symbol | A single function or type | You want a tight, focused edit |
| @Docs | Indexed library docs | Using a framework or SDK API |
| @Web | Live web search results | You need current, outside info |
Step 3: Pull in docs and the web
Use @Docs to attach indexed documentation for a library so the model uses the real API instead of guessing. Use @Web to let it search the live web for current information that is not in its training data.
Step 4: Index your own docs
You can add a documentation site to Cursor's index from Settings so it appears under @Docs. Paste the docs URL, let Cursor crawl it, and afterwards reference it by name in any chat.
Result: instead of a generic answer, the model edits your actual authorize() function using the real Stripe API, because you handed it exactly the code and docs the task needed.
Watch related tutorials
33:42
41:18
28:05
3:12
26:54
39:10New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.