zed icon indicating copy to clipboard operation
zed copied to clipboard

Add a Hotkey to toggle inline suggestions like we have on vscode

Open LFSCamargo opened this issue 11 months ago • 4 comments

Check for existing issues

  • [X] Completed

Describe the feature

The ideal way would be configuring a hotkey to trigger inline suggestions

If applicable, add mockups / screenshots to help present your vision of the feature

No response

LFSCamargo avatar Feb 29 '24 22:02 LFSCamargo

If I understand you correctly, you're looking for alt-\.

Moshyfawn avatar Feb 29 '24 22:02 Moshyfawn

There's any way to replace that hotkey with something else?

LFSCamargo avatar Mar 01 '24 03:03 LFSCamargo

There's any way to replace that hotkey with something else?

You can open the default keybindings by opening the command pallet by pressing cmd-shift-p and selecting zed: open default keymap. There you will see all the keymaps that you can override by selecting zed: open keymap from the command palette and constructing your own keymaps.

If you want to change the suggested key combination, you can find the copilot::Suggest command and override it in the keymaps.json file, for example like this

[
  {
    "context": "Editor && mode == full",
    "bindings": {
      "ctrl-shift-right": "copilot::Suggest"
    }
  }
]

Moshyfawn avatar Mar 01 '24 03:03 Moshyfawn

You can find out more in the Key bindings docs.

Moshyfawn avatar Mar 01 '24 03:03 Moshyfawn

It seems like in the current stable, it is all or nothing.

You can have it either turned on

"show_copilot_suggestions": true

and it auto pops up as you type.

Or it is turned off

"show_copilot_suggestions": false

and then copilot::Suggest does nothing.

alex35mil avatar May 30 '24 15:05 alex35mil

Hi @alex35mil,

I can reproduce the issue you are seeing. After I disable inline completions (either per-language or globally) triggering copilot::Suggest does nothing. I believe this is a bug.

Second, unrelated to your issue show_copilot_suggestions will be deprecated shortly. Please switch to use show_inline_completions going forward.

notpeter avatar Jun 20 '24 13:06 notpeter

just want to bump this, I hate when the completions show up automatically, but that means I can't use it all in zed with this bug 😢

obermillerk avatar Jul 23 '24 06:07 obermillerk