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

Does not work on Neovim #415

Open
jcpsimmons opened this issue Jul 16, 2024 · 4 comments
Open

Does not work on Neovim #415

jcpsimmons opened this issue Jul 16, 2024 · 4 comments

Comments

@jcpsimmons
Copy link

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
Copy link

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
Copy link
Contributor

Related #399

@cacilhas
Copy link

cacilhas commented Aug 12, 2024

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.

@LeonardoMor
Copy link
Contributor

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

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

4 participants