Exafunction / codeium.vim

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

Does not work on Neovim #415

Open jcpsimmons opened 2 months ago

jcpsimmons commented 2 months ago

I have tried a number of the fixes here - the plugin loads with lazy and I am adding some enterprise server options (the ones provided directly from the Codeium website). Codeium Auth works (and takes me to the correct enterprise site) then... nothing, no completions or errors.

Config in Lazy:

    {
        "Exafunction/codeium.vim",
        dependencies = {
            "nvim-lua/plenary.nvim",
            "hrsh7th/nvim-cmp",
        },
        event = "BufEnter",
        config = function()
            vim.keymap.set("i", "<C-Space>", function()
                return vim.fn["codeium#Accept"]()
            end, { expr = true, silent = true })
        end,
    }
little-populus commented 2 months ago

try to use :imap <c-space> to check if any other plugin has occupied the key map, if nothing bound, run :checkhealth to test if the the plugin is working regularly, if reveals warning that language server failure or others, delete codeium directory from .cache/nvim/codeium, that will redownload and reinstall language server from internet. Maybe it works.

LeonardoMor commented 2 months ago

Related #399

cacilhas commented 1 month ago

I got the very same issue – I may be wrong, but I reckon it isn’t straightly related to #339.

My key-binding settings for Codeium are (nvChad):

  ai = {
    i = {
      ["<M-Right>"] = {
        vim.fn["codeium#Accept"],
        "accept suggestion",
      },
      ["<M-Down>"] = {
        function()
          return vim.fn["codeium#CycleCompletions"](-1)
        end,
        "previous suggestion",
      },
      ["<M-Up>"] = {
        function()
          return vim.fn["codeium#CycleCompletions"](1)
        end,
        "next suggestion",
      },
      ["<M-Left>"] = {
        vim.fn["codeium#Clear"],
        "clear current suggestion",
      },
    },
  },

I tried to use function() return vim.fn["codeium#Accept"]() end instead of vim.fn["codeium#Accept"] directly, same outcome.

I also tried to use another functions in place of vim.fn["codeium#Accept"], and they work fine, the functions that don’t work are:

By the way, the suggestion has been shown correctly, so I cannot help but think it’s a codeium#Accept (and similar functions) issue.

LeonardoMor commented 1 month ago

Please give steps to reproduce outside of NvChad, with normal nvim style mappings.