codeium.vim icon indicating copy to clipboard operation
codeium.vim copied to clipboard

Does not work on Neovim

Open jcpsimmons opened this issue 1 year ago • 6 comments

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,
	}

jcpsimmons avatar Jul 16 '24 18:07 jcpsimmons

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.

little-populus avatar Jul 17 '24 06:07 little-populus

Related #399

LeonardoMor avatar Jul 18 '24 19:07 LeonardoMor

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:

  • codeium#Accept (does nothing)
  • codeium#CycleOrComplete (only cycles)
  • codeium#Complete (does nothing)
  • codeium#AcceptNextWord (does nothing)
  • codeium#AcceptNextLine (does line)

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

cacilhas avatar Aug 12 '24 12:08 cacilhas

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

LeonardoMor avatar Aug 13 '24 16:08 LeonardoMor

I installed the plugin into neovim using Lazy (kickstart.nvim) The only configs I have are

    'Exafunction/codeium.vim',
    dependencies = {
      'nvim-lua/plenary.nvim',
      'hrsh7th/nvim-cmp',
    },
    event = 'BufEnter',
  },

CodeiumAuth worked, then nothing happens at all. I have no indication that it even exists outside of the :Codeium options being listed and I can view the help file.

Windows 11

tgienger avatar Mar 17 '25 19:03 tgienger

Since you're using Neovim, neocodeium might work better for you.

LeonardoMor avatar Mar 19 '25 01:03 LeonardoMor