Exafunction / codeium.vim

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

Bug: No suggestions showing up at all #12

Closed chrisgrieser closed 1 year ago

chrisgrieser commented 1 year ago

I have installed the plugin via lazy.vim with the suggested snippet in the README.

I ran :Codeium Auth, signed up, and entered the token.

Nothing happens. Restarting neovim or :Codium Enable do simply nothing.

tried the test.py example from the tutorial.


macOS 13.0.1 (M1)
neovim 0.8.2 (homebrew)
Neovide 0.10.3 (homebrew)
frei-0xff commented 1 year ago

I had the same issue. Message in the log file said: Failed to download language server binary. As far as I was able to debug this issue, the problem is in /autoload/codeium/server.vim line 126. At least in nvim 0.6.0 expand('<script>:p:h:h:h') returns empty string which results in plugin trying to download language server binary to the path /bin and obviously not succeeding.

kdurant commented 1 year ago

I had the same issue.

pqn commented 1 year ago

@juliosueiras I remember you modified that line, could it be we need to revert it? @frei-0xff what happens if you try to install at 78998fff802f7d841a06591d034d8a07a69c2070 instead?

frei-0xff commented 1 year ago

@frei-0xff what happens if you try to install at 78998ff instead?

It doesn't work too. Code expand('<sfile>:h:h') returns string . in nvim 0.6.0. So it is trying to create bin folder in the current directory and download language server binary there. Update: When code expand('<sfile>:h:h') is called in https://github.com/Exafunction/codeium.vim/blob/38242b72db6b62b20dc4de712f3e8d53ae3f5503/plugin/codeium.vim#L57 it returns right result with absolute path to plugin directory, but when it is called in autoload/codeium/server.vim it returns .

juliosueirasED commented 1 year ago

Would it make more sense to use an plugin variable as a way to define the location to download and store the language server binary?

chrisgrieser commented 1 year ago

couldn't you install the language server binary in fn.stdpath("data")?

chrisgrieser commented 1 year ago

okay, for whatever weird reason, I just installed codium on a different device, with 100% the same config and this issue does not occur on this device – suggestion occur just fine here.

Also, I did not need to set up any authentification on the second device, it just worked out of the box.

juliosueiras commented 1 year ago

it might make more sense to reuse the codeium config directory to download the binary? given that the <sfile>/<script> have unpredictable behaviour

juliosueiras commented 1 year ago

Created this PR #15 for that purpose

pqn commented 1 year ago

couldn't you install the language server binary in fn.stdpath("data")?

Seems this may not exist in Vim.

Created this PR #15 for that purpose

This seems like a reasonable solution. Later we can add an override if people prefer.