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

Copilot feature for accept word/line #149

Closed
Cthutu opened this issue Apr 16, 2023 · 3 comments
Closed

Copilot feature for accept word/line #149

Cthutu opened this issue Apr 16, 2023 · 3 comments

Comments

@Cthutu
Copy link
Contributor

Cthutu commented Apr 16, 2023

Copilot has a feature for accepting the next word and the next line of the suggestion. Could these be mapped to keybindings (e.g. Ctrl-L/Ctrl-Right for accept word and Ctrl-J/Ctrl-Down for accept line) in the completion.copilot-cmp pack?

@Cthutu
Copy link
Contributor Author

Cthutu commented Apr 16, 2023

Added PR for this: #150

@namefailed
Copy link
Contributor

You can exit the default configuration like this! these are my bindings for accepting words etc.

  { import = "astrocommunity.completion.copilot-lua" },
  {
    "copilot.lua",
    opts = {
      panel = {
        auto_refresh = true,
        keymap = {
          accept = "<C-l>",
          jump_next = "<C-j>",
          jump_prev = "<C-k>",
          dismiss = "<C-h>",
        },
        layout = {
          position = "right",
        },
      },
      suggestion = {
        keymap = {
          accept = "<C-l>",
          accept_word = false,
          accept_line = false,
          next = "<C-j>",
          prev = "<C-k>",
          dismiss = "<C-h>",
        },
      },
    },
  },

@mehalter
Copy link
Member

Closed with #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants