@Code Mention doesn't work

Currently I read in the documentation @ Mentions | Cursor Docs that I can add easily parts of a code file to the context. However, when trying this with Cursor V 2.4.31 via @Code <file-name>, nothing is happening like providing which parts of a file are available.

It only provides me the possibilty to include the whole file. Also I don’t see anything from the available command that something like @Code does exist.

Did I miss anything or is this feature not available yet?

Regarding setup:

  • Windows 11
  • Cursor V2.4.31
  • Connected with WSL to the code base

Hi Cédric, thanks for sharing.

You didn’t miss anything: in Cursor 2.0 (and many 2.x builds), the autocomplete/symbol reference flow for @Code/@Definitions was removed as part of the context menu changes, so it’s normal that you can’t select “parts” of a file and only get the entire attachment.

Workarounds: Attach the entire file using Files & Folders (e.g., @types.ts or the file containing the function/class) and explicitly specify the symbol you want to change in the message.

If you only want a snippet, select the code in the editor and use “Add to Chat” (Ctrl/⌘ Shift + L) to send only that selection as context.

WSL might not be the root cause; your description matches the known change in Cursor 2.x menu behavior.

:cursor: Have a good day. :cursor: