0

I'm trying to configure Avante.nvim to work with GitHub Copilot, but I can't get the suggestion acceptance keybinding to work. The suggestions appear correctly in insert mode (in gray text), but none of my configured keybindings will accept them.

Here's my current configuration in ~/.config/nvim/after/plugin/avante.lua:

avante.setup({
  provider = "copilot",
  providers = {
    copilot = {
      suggestion_provider = "copilot.vim"
    },
  },
  behaviour = {
    auto_suggestions = false,
    auto_set_highlight_group = true,
    auto_set_keymaps = false,
    auto_apply_diff_after_generation = false,
    support_paste_from_clipboard = false,
  },
  mappings = {
    suggestion = {
      accept = "<C-l>",
      next = "<M-]>",
      prev = "<M-[>",
      dismiss = "<C-]>",
    },
    sidebar = {
      switch_windows = "<Tab>",
      reverse_switch_windows = "<S-Tab>",
    },
  }
})

What I've tried:

  • Different key combinations (, , )
  • Both auto_set_keymaps = true and false Custom keymaps using vim.keymap.set
  • Restarting Neovim after each change.
  • The plugin itself works - I can see suggestions appearing as I type, and the sidebar functionality works correctly. It's just that I can't accept the suggestions with any key combination.

Environment:

  • macOS
  • Neovim [0.11.3]
  • Avante.nvim [latest version]
  • GitHub Copilot.vim plugin installed and working

Has anyone successfully configured custom keybindings for accepting suggestions in Avante.nvim?

I'm attaching a screenshot that shows what happens when I hit Ctrl-l, in insert mode when the suggestion appears. enter image description here

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.