Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot remap editor::ConfirmCompletion from "tab" to another keystroke to insert Copilot suggestions #8712

Closed
1 task done
wufe opened this issue Mar 2, 2024 · 2 comments
Labels
autocompletions Feedback for code completions in the editor bug [core label] keymap / key binding Feedback for keyboard shortcuts, key mapping, etc vim

Comments

@wufe
Copy link

wufe commented Mar 2, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Might be related to #8707

Since "tab" is performing both tabs insertion and confirmation of copilot suggestions, I wanted to differentiate between the two operations.

To add a tab I provided this binding:

{
        "bindings": {
            "tab": ["workspace::SendKeystrokes", "\t"]
        }
    }

To confirm the copilot completion I tried all the following bindings (trying both ctrl-cmd-k and ctrl-cmd-tab), but none of them is working:

{
        "context": "Editor && mode == full",
        "bindings": {
            "alt-\\": null,
            "ctrl-cmd-s": "copilot::Suggest",
            "ctrl-cmd-n": "copilot::NextSuggestion",
            "ctrl-cmd-p": "copilot::PreviousSuggestion",
            "ctrl-cmd-tab": "editor::ConfirmCompletion",
            "ctrl-cmd-k": "editor::ConfirmCompletion"
        }
    },
    {
        "context": "Editor && showing_completions",
        "bindings": {
            "ctrl-cmd-tab": "editor::ConfirmCompletion",
            "ctrl-cmd-k": "editor::ConfirmCompletion"
        }
    },
    {
        "context": "Editor && copilot_suggestion",
        "bindings": {
            "ctrl-cmd-tab": "editor::ConfirmCompletion",
            "ctrl-cmd-k": "editor::ConfirmCompletion"
        }
    },
    {
        "bindings": {
            "tab": ["workspace::SendKeystrokes", "\t"],
            "ctrl-cmd-tab": "editor::ConfirmCompletion",
            "ctrl-cmd-k": "editor::ConfirmCompletion"
        }
    }

So it seems like the editor::ConfirmCompletion is not the right action, because ctrl-cmd-n and ctrl-cmd-p are working fine

Environment

Zed: v0.124.8 (Zed)
OS: macOS 14.0.0
Memory: 32 GiB
Architecture: aarch64

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

Screenshot 2024-03-02 at 15 42 21

Trying to hit ctrl-cmd-k or ctrl-cmd-tab does not insert the suggested snippet from copilot

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

@wufe wufe added admin read bug [core label] labels Mar 2, 2024
@Moshyfawn
Copy link
Member

The other question is about the autocomplete confirmation for the copilot, so let's close this one in favour of the other one. Be sure to +👍 it and add any additional information that might be missing.

@Moshyfawn
Copy link
Member

Duplicate of #8707

@Moshyfawn Moshyfawn marked this as a duplicate of #8707 Mar 2, 2024
@Moshyfawn Moshyfawn closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
@Moshyfawn Moshyfawn added vim keymap / key binding Feedback for keyboard shortcuts, key mapping, etc autocompletions Feedback for code completions in the editor and removed triage labels Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocompletions Feedback for code completions in the editor bug [core label] keymap / key binding Feedback for keyboard shortcuts, key mapping, etc vim
Projects
None yet
Development

No branches or pull requests

3 participants