Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim
https://codeium.com
MIT License
3.77k stars 126 forks source link

Option + Right Bracket keyboard shortcut does not show alternate suggestions. #219

Open arturpedrotti opened 10 months ago

arturpedrotti commented 10 months ago

Issue Details:

Utilizing the Option + Right Bracket keyboard shortcut does not yield the expected outcome of viewing alternative suggestions. Could you please assist in resolving this issue?

fortenforge commented 10 months ago

You might need to check the setting "use option as meta key"

fortenforge commented 10 months ago

https://www.shell-tips.com/mac/meta-key/#gsc.tab=0

dcy commented 10 months ago

I have the same problem.

dcy commented 10 months ago

image item2 still not work

arturpedrotti commented 10 months ago

I am interested in rebinding the "Next Suggestion" functionality to a different key, such as Ctrl + Right Bracket.

I have looked through the documentation and source code but could not find the specific function responsible for this feature. Could you please provide the name of this function so that I can rebind it in my init.lua configuration file?

Thanks for the assistance.

fortenforge commented 10 months ago

The Keybindings section of the readme very explicitly explains how to rebind the Next Suggestion command: https://github.com/Exafunction/codeium.vim#%EF%B8%8F-keybindings

jasonshanks commented 3 months ago

I too am failing to get any of the keybindings to work correctly.

Neovim 0.9.5 (Mac) Lazy.vim

A couple issues:

  1. I think this repo should explicitly state Windows only? It fails trying to load an .exe binary at launch. The other Codeium.nvim repo installs and runs fine. However it is missing the documentation on setting up alternative keybindings, but I'm assuming it's the same.
  2. I'm fairly certain <c- is not a valid keymap for CONTROL, should all be <C- ?
  3. Even still, with default config: accepts suggestion for me, not . (I can live with that)
  4. Neither the default cycle bindings work for me, nor does the fixed up suggested starter custom config. Oddly the directional up/down arrows do but who wants to use them? 🤣 I actually have a 60% keyboard anyway.

This is the separate lazy.vim config file I have:

codeium.lua:

return {
  {
    "Exafunction/codeium.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
      "hrsh7th/nvim-cmp",
    },
    lazy = false,
    config = function()
      -- Change '<C-g>' here to any keycode you like.
      -- vim.keymap.set('i', '<C-g>', function () return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
      vim.keymap.set("i", "<C-;>", function()
        return vim.fn["codeium#CycleCompletions"](1)
      end, { expr = true, silent = true })
      vim.keymap.set("i", "<C-,>", function()
        return vim.fn["codeium#CycleCompletions"](-1)
      end, { expr = true, silent = true })
      vim.keymap.set("i", "<C-x>", function()
        return vim.fn["codeium#Clear"]()
      end, { expr = true, silent = true })
    end,
  },
}