Exafunction / codeium.vim

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

Suggestion not work because "Failed to download language server binary", maybe glob function problem #122

Closed Virako closed 1 year ago

Virako commented 1 year ago

I put in codeium/server.vim some logs line for investment the problem. I get "Failed to download language server binary.", then i put in the previous line of codeium/server.vim line 187 the next lines:

call codeium#log#Error('PATH 1: ' . s:bin)
call codeium#log#Error('PATH 2: ' . glob(s:bin))
call codeium#log#Error('EMPTY: ' . empty(glob(s:bin)))

The log throw the next:

PATH 1: /home/user/.codeium/bin/6379f8f8e084ec1f419e2dccd70fa7b841fbc66b/language_server_linux_x64 PATH 2: EMPTY: 1

The problem is the glob function, because the file in the PATH 1 exist in my machine, and if I comment the line 189 that contains return '' when empty file, the suggestion works perfectly.

pqn commented 1 year ago

Does using filereadable(s:bin) work in your case?

Virako commented 1 year ago

Does using filereadable(s:bin) work in your case?

Yes, I get 1

pqn commented 1 year ago

Thanks, will publish a fix for this soon.