getcursor / cursor

The AI Code Editor
https://cursor.com
25.29k stars 1.57k forks source link

Copilot++ completion overrides suggestion widget with no way to customize behavior #1488

Open PoignardAzur opened 5 months ago

PoignardAzur commented 5 months ago

The problem

When I'm writing code, Cursor will occasionally give me a list of auto-completed suggestions pulled from the active language server, like all modern IDEs do.

That list of auto-completed suggestions is often unusable, because the Tab key is hijacked by Copilot++. If both the suggestion list and the AI-provided inline completion appear at the same time, as in the screenshot below, then the inline AI completion will take priority every time.

image

That behavior seems to be hard-coded: even when the VSCode-inherited "Keyboard shortcuts troubleshooting" tab will report that a VSCode-native shortcut is picked, that shortcut seems to be overridden by the "insert inline AI completion" behavior.

Being hard-coded means there is no way to customize the behavior (eg assign AI-completion to another key).

Ideal solution

Ideally, when the "suggestion list" widget appears, the inline AI completion should be one of the options. If you pick that option, the AI text should be inserted, the way it happens right now. If you pick any other option, the AI text should be discarded.

You could even use that widget to pick between multiple AI completions.

Minimal solution

There should be ways to override the AI completion shortcut.

When the "suggestion list" widget and inline completions appear at the same time, the suggestion list widget should take priority.

arvid220u commented 5 months ago

Hi! Are you able to accept the language server suggestion using Enter instead of Tab?

PoignardAzur commented 5 months ago

I haven't tried. I had disabled Enter for completions in VsCode, for similar reasons.

Overall, using tab when I see a language server suggestion is pretty deep in my muscle memory.

PoignardAzur commented 5 months ago

To be clear, the "accept language suggestions with Enter" solution isn't satisfying to me. I would really prefer if Cursor gave me ways to customize the shortcuts that trigger inline completion instead of hard-coding them.

Giving language server suggestions priority over inline suggestions would be a good first step. I've almost never been in a situation where I was provided with both where the inline suggestions was the better one.