Exafunction / codeium.nvim

A native neovim extension for Codeium
MIT License
639 stars 50 forks source link

Hash does not match the expected Codeium server stamp (NixOS) #140

Open tomaskallup opened 5 months ago

tomaskallup commented 5 months ago

So I tried to get this plugin running on NixOS, my approach was to just install the language server via home-manager and set the tools.language_server. However the language server I currently have (from unstable) is 1.6.18 and this plugin expects 1.6.7 and complains on nvim startup

The configuration is as follows (using lazy.nvim):

return {
  'hrsh7th/nvim-cmp',
  lazy = false,
  -- these dependencies will only be loaded when cmp loads
  -- dependencies are always lazy-loaded unless specified otherwise
  dependencies = {
    'hrsh7th/cmp-nvim-lsp',
    'hrsh7th/cmp-buffer',
    'hrsh7th/cmp-path',
    'hrsh7th/cmp-nvim-lsp-signature-help',
    'saadparwaiz1/cmp_luasnip',
    'L3MON4D3/LuaSnip',
    {
      'Exafunction/codeium.nvim',
      dependencies = {
        'nvim-lua/plenary.nvim',
      },
      config = function()
        require('codeium').setup({
          tools = {
            language_server = '/home/armeeh/.nix-profile/bin/codeium_language_server',
          },
        })
      end,
    },
    'onsails/lspkind.nvim',
  },
  config = function () ... end,
}

The completions from codeium seem to work, it's just this annoying message every time I open nvim.

FMGordillo commented 4 months ago

Have you tried the README parameter wrapper?

wrapper: the path to a wrapper script/binary that is used to execute any binaries not listed under tools. This is primarily useful for NixOS, where a FHS wrapper can be used for the downloaded codeium server.

EDIT: In conjunction with your own bin from Nix. I am not even close a Nix hobbyst, but something similar was recommended to me to use Prisma ORM or Biome

tomaskallup commented 4 months ago

I've seen the wrapper parameter, but have no idea what I should put in there. From issues that I've been able to find, there were links to other peoples configs, which were either outdated or used home managers nvim configuration, so I couldn't find any examples.

AlansCodeLog commented 1 month ago

@tomaskallup They mean what program to use to download and run the server. If you just download and try to run on nixos it won't work. So you could use something like wrapper = "steam-run". But note this those put the downloaded server outside of nixos control. It will stop the annoying hash check though.

It would be nice to be able to configure a custom hash or disable checking it.