codeium.vim
codeium.vim copied to clipboard
no behavior and no logfile in neovim
hi! I posted in the discord but was suggested to move it here.
I went through the setup process:
added Plug 'Exafunction/codeium.vim'
to my vim-plug section
ran :Codeium Auth
and copy/pasted my key in
quit and re-opened vim, a file called fib.py
and typed def fib(n):
and nothing happens, even after several seconds
I even backed up my init.vim
and made a new one that was minimal config:
" Install vim-plug if not found
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
call plug#begin()
Plug 'Exafunction/codeium.vim'
call plug#end()
but still had the same lack of behavior
I saw in #121 that there should be a logfile in /tmp/
but no logfile gets created at all either :scream: so I really don't know where to start debugging this
Do you know if the installation succeeded? You would have seen a prompt appear after typing :Codeium Auth
. Recently we had #178 which could be related.
I did have a prompt appear, and successfully inputted my key
I've also just tried re-installing and it's still not working
To confirm, you tried reinstalling with main
, as in Plug 'Exafunction/codeium.vim', { 'branch': 'main' }
?
I wonder if it's specific to the Plug
installation method. Would it be possible for you to also test a manual install?
I had not tried with { 'branch': 'main' }
, but I just tried that now and it still failed :(
will try a manual install
just tried with a manual install & still nothing after running :Codeium Auth
and pasting my token - not even a log file
I'm also having the same problem. Did you find a fix @samm81 ?
no I gave up and used github copilot :(
I've had a similar experience where no completions are shown. The lack of logs made it difficult to debug. I'm on neovim nightly.
nvim --version
NVIM v0.10.0-dev-4e59
Same problem here, running the latest version of the plugin with nvim v0.9.5 on openSUSE Tumbleweed. Everything was working and then, out of nowhere, it stopped—well, after I updated to the latest commit on main
. No logs available.
Running the server manually I do see some errors about a failed connection. I'm guessing the errors are related to the problem?
[~/.codeium/bin/6b19e3b934fc548fa6973efbbd090569f4685450]$ ./language_server_linux_x64
I0229 13:37:01.982088 29826 main.go:544] Starting language server manager with pid 29826
I0229 13:37:01.982827 29826 main.go:289] Language server manager attempting to connect to language server at 127.0.0.1:42100
I0229 13:37:02.076815 29840 main.go:538] Starting language server process with pid 29840
I0229 13:37:02.076926 29840 proxy.go:113] proxyplease.proxy> No proxy provided. Attempting to infer from system.
I0229 13:37:02.076938 29840 proxy.go:113] proxyplease.proxy> No proxy could be determined. Assuming a direct connection.
I0229 13:37:02.076951 29840 client.go:589] [DEBUG] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions
I0229 13:37:02.077321 29840 client.go:646] [ERR] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions request failed: Get "http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions": dial tcp 0.0.0.0:50001: connect: connection refused
I0229 13:37:02.077349 29840 client.go:690] [DEBUG] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions: retrying in 100ms (3 left)
I0229 13:37:02.179132 29840 client.go:646] [ERR] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions request failed: Get "http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions": dial tcp 0.0.0.0:50001: connect: connection refused
I0229 13:37:02.179169 29840 client.go:690] [DEBUG] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions: retrying in 100ms (2 left)
I0229 13:37:02.282371 29840 client.go:646] [ERR] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions request failed: Get "http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions": dial tcp 0.0.0.0:50001: connect: connection refused
I0229 13:37:02.282437 29840 client.go:690] [DEBUG] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions: retrying in 100ms (1 left)
I0229 13:37:02.382931 29840 client.go:646] [ERR] GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions request failed: Get "http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions": dial tcp 0.0.0.0:50001: connect: connection refused
W0229 13:37:02.382976 29840 proxy.go:128] proxy failed to connect: GET http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions giving up after 4 attempt(s): Get "http://0.0.0.0:50001/exa.api_server_pb.ApiServerService/GetCompletions": dial tcp 0.0.0.0:50001: connect: connection refused
I0229 13:37:02.383001 29840 unleash.go:86] Initializing Unleash
I0229 13:37:03.158131 29840 unleash.go:106] Successfully initialized Unleash
I0229 13:37:03.163723 29840 server.go:317] Successfully created API server client
I0229 13:37:03.166355 29840 server.go:331] Successfully created API streaming client
I0229 13:37:03.193699 29840 server.go:340] Successfully initialized tokenizer
I0229 13:37:03.193814 29840 search_provider.go:166] Using database at /home/james/.codeium/database/default/2/MODEL_EMBED_6591
I0229 13:37:03.194605 29840 search_provider.go:178] Successfully created embedding search database
I0229 13:37:03.194864 29840 search_provider.go:226] Successfully created embedding search provider
I0229 13:37:03.194874 29840 server.go:424] Successfully created exact search provider
E0229 13:37:03.195398 29840 unleash.go:57] Unleash error: Version string empty
E0229 13:37:03.195446 29840 unleash.go:57] Unleash error: Version string empty
E0229 13:37:03.195450 29840 unleash.go:57] Unleash error: Version string empty
I0229 13:37:03.197931 29840 server.go:452] Successfully created completion provider
I0229 13:37:03.246097 29840 server.go:517] Child process attempting to acquire lock file /tmp/child_lock_1709224621982266718_2766214978486779549
I0229 13:37:03.246202 29840 server.go:527] Child process acquired lock file /tmp/child_lock_1709224621982266718_2766214978486779549
I0229 13:37:03.250389 29840 server.go:149] Language server will attempt to listen on host 127.0.0.1
I0229 13:37:03.250586 29840 server.go:156] Language server listening on fixed port at 42100
E0229 13:37:03.251658 29840 api_server_client.go:131] Ping error: unavailable: dial tcp 0.0.0.0:50001: connect: connection refused
I0229 13:37:03.264435 29826 main.go:340] Language server manager successfully connected to new language server at 127.0.0.1:42100
E0229 13:37:33.252818 29840 api_server_client.go:131] Ping error: unavailable: dial tcp 0.0.0.0:50001: connect: connection refused
For "fun" I opened port 50001 on my firewall, but the problem persists.
James can you share your init.nvim config? It looks like your api server url is not getting set correctly somehow
https://github.com/Exafunction/codeium.vim/blob/f2d90dedb45e35f7563d2ce3a31c6928f79de678/autoload/codeium/server.vim#L223
James can you share your init.nvim config? It looks like your api server url is not getting set correctly somehow
https://github.com/Exafunction/codeium.vim/blob/f2d90dedb45e35f7563d2ce3a31c6928f79de678/autoload/codeium/server.vim#L223
My init.lua
file is broken into several pieces, but the relevant part would be this from my plugins file:
use({
'Exafunction/codeium.vim',
config = function()
require('plugins.config.codeium')
end,
})
And the file it requires, codeium.lua
:
local installed, codeium = pcall(require, 'codeium')
if not installed then
return
end
vim.g.codeium_filetypes = {
['mail'] = false,
}
Basically, I just install the plugin and have a simple configuration to disable a certain file type, nothing fancy. Unless another plugin is somehow messing things up.
local fn = vim.fn
local packer_path = fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(packer_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', packer_path})
vim.api.nvim_command 'packadd packer.nvim'
end
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use ({
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
config = function()
require('plugins.config.treesitter')
end,
})
use ({
'nvim-treesitter/nvim-treesitter-context',
config = function()
require('plugins.config.treesitter-context')
end,
})
use ({
'Mofiqul/adwaita.nvim',
config = function()
vim.cmd([[colorscheme adwaita]])
end,
})
use({
'hrsh7th/nvim-cmp',
requires = {
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/cmp-cmdline',
'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
'onsails/lspkind.nvim',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
'rafamadriz/friendly-snippets',
},
config = function()
require('plugins.config.lsp-cmp')
require('plugins.config.luasnip')
require('lsp_lines').setup()
vim.diagnostic.config({ virtual_text = false })
end,
})
use ({
'neovim/nvim-lspconfig',
config = function()
require('plugins.config.lspconfig')
end,
})
use ({
'mfussenegger/nvim-lint',
config = function()
require('plugins.config.lint')
end,
})
use ({
'folke/trouble.nvim',
config = function()
require('plugins.config.trouble')
end,
})
use({
'Exafunction/codeium.vim',
config = function()
require('plugins.config.codeium')
end,
})
use ({
'nvim-lualine/lualine.nvim',
require = {
'kyazdani42/nvim-web-devicons',
opt = true,
},
config = function()
require('plugins.config.lualine')
end,
})
use ({
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup()
end
})
use ({
'lukas-reineke/indent-blankline.nvim',
config = function()
require('plugins.config.ibl')
end
})
use ({
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons',
},
config = function()
require('plugins.config.nvim-tree')
end,
})
use 'windwp/nvim-ts-autotag'
use 'lewis6991/impatient.nvim'
use 'fatih/vim-go'
use 'nvim-tree/nvim-web-devicons'
end)
Mind you, that error I posted is from when I initiate the language server manually, without any arguments. I have no idea what errors are returned when I initiate it with nvim
, because I can't find any logs.
The only file related to Codeium I can find in /tmp/
is called unleash-repo-schema-v1-codeium-language-server.json
, but that doesn't look to have any logging information.
I tried disabling all plugins and leaving Codeium only, but the same problem happens.
Seems like the manager_dir
argument from the binary is what sets where the logs are going to be. It's set over here:
https://github.com/Exafunction/codeium.vim/blob/f2d90dedb45e35f7563d2ce3a31c6928f79de678/autoload/codeium/server.vim#L218C3-L218C14
For whatever reason, that isn't working on my system. I changed the line manually to get the logs, and it looks like the server starts just fine?
[~/.../packer/start/codeium.vim](main)$ cat /tmp/codeium/server_outputs/language_server_stderr_1709241536661093898_2990390010207539289
I0229 18:18:56.813040 23606 main.go:538] Starting language server process with pid 23606
I0229 18:18:56.813258 23606 proxy.go:113] proxyplease.proxy> No proxy provided. Attempting to infer from system.
I0229 18:18:56.813287 23606 proxy.go:113] proxyplease.proxy> No proxy could be determined. Assuming a direct connection.
I0229 18:18:56.813304 23606 client.go:589] [DEBUG] GET https://server.codeium.com/exa.api_server_pb.ApiServerService/GetCompletions
I0229 18:18:57.404394 23606 unleash.go:86] Initializing Unleash
I0229 18:18:58.018945 23606 unleash.go:106] Successfully initialized Unleash
I0229 18:18:58.024000 23606 server.go:317] Successfully created API server client
I0229 18:18:58.025880 23606 server.go:331] Successfully created API streaming client
I0229 18:18:58.049807 23606 server.go:340] Successfully initialized tokenizer
I0229 18:18:58.049911 23606 server.go:387] Local search is enabled, will index local files.
I0229 18:18:58.049918 23606 server.go:391] Using 4 indexer workers
I0229 18:18:58.049971 23606 search_provider.go:166] Using database at /home/james/.codeium/database/default/2/MODEL_EMBED_6591
I0229 18:18:58.050770 23606 search_provider.go:178] Successfully created embedding search database
I0229 18:18:58.050972 23606 search_provider.go:200] Successfully created and started indexer
I0229 18:18:58.050986 23606 search_provider.go:226] Successfully created embedding search provider
I0229 18:18:58.050993 23606 server.go:424] Successfully created exact search provider
E0229 18:18:58.051602 23606 unleash.go:57] Unleash error: Version string empty
E0229 18:18:58.051659 23606 unleash.go:57] Unleash error: Version string empty
E0229 18:18:58.051665 23606 unleash.go:57] Unleash error: Version string empty
I0229 18:18:58.056891 23606 server.go:452] Successfully created completion provider
I0229 18:18:58.097347 23606 server.go:517] Child process attempting to acquire lock file /tmp/codeium/locks/child_lock_1709241536661095010_7452688692703819386
I0229 18:18:58.097487 23606 server.go:527] Child process acquired lock file /tmp/codeium/locks/child_lock_1709241536661095010_7452688692703819386
I0229 18:18:58.101729 23606 server.go:149] Language server will attempt to listen on host 127.0.0.1
I0229 18:18:58.101941 23606 server.go:156] Language server listening on random port at 37727
I0229 18:18:58.102111 23606 web_server.go:271] Chat Client file server listening at https://127.0.0.1:38683
I0229 18:18:58.102565 23606 web_server.go:229] Chat Web Server listening at ws://127.0.0.1:41625
W0229 18:19:05.148366 23606 server.go:233] Got signal terminated, shutting down
I0229 18:19:05.148703 23606 server.go:605] Language server shutting down
So I have no clue as to why the suggestions stopped showing up. I tested and I can reach and resolve server.codeium.com
just fine too. Interesting enough, I just tested and I can't use https://codeium.com/live/general
either.
Problem solved—I had an old teams subscription lingering around, which prevented the client from working. After I deleted the expired team, free suggestions started to show up again.
As for the logs, they're deleted once you close nvim
, so they're only visible while nvim
is open.