codeium.vim icon indicating copy to clipboard operation
codeium.vim copied to clipboard

When open telescope will cause un-terminated curl request to codeium language server

Open DachiChang opened this issue 1 year ago • 3 comments

Re-Produce

  1. install codeium-vim by the tag 1.8.16
  2. open nvim
  3. enable telescope promt

After the steps, you will see lot of un-terminated curl request under nvim main process. see the video. But 1.8.10 doesn't.

pstress show the nvim process.

https://github.com/Exafunction/codeium.vim/assets/1279986/03851fa5-9015-4c62-9800-a5632d68df95

Uploading codeium-bug-clip.mov…

-+= 77289 dachichang nvim --embed
 |-+= 77292 dachichang /Users/dachichang/.codeium/bin/f772d3d7b45d3f1aea82cee1fb50501c8869f1a2/language_server_macos_arm --api_server_url https://server.code
 | \--- 77293 dachichang /Users/dachichang/.codeium/bin/f772d3d7b45d3f1aea82cee1fb50501c8869f1a2/language_server_macos_arm --api_server_url https://server.co
 |--= 77306 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77317 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77329 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77340 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77344 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77346 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77348 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77350 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77352 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77356 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77359 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77362 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77364 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77366 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77380 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77382 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 |--= 77384 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js
 \--= 77388 dachichang /usr/bin/curl http://127.0.0.1:49666/exa.language_server_pb.LanguageServerService/GetCompletions --header Content-Type: application/js

DachiChang avatar Apr 11 '24 02:04 DachiChang

Same issue, every time open telesecope(and wait two seconds) will open two new, and use to quit telescope, request will not close. This will casue EMFILE: too many open files error.

jheroy avatar Oct 14 '24 04:10 jheroy

I’m currently using

let g:codeium_filetypes = {
       \ "TelescopePrompt": v:false,
\ }

as a temporary workaround.

jheroy avatar Oct 14 '24 05:10 jheroy

I’m currently using

let g:codeium_filetypes = { \ "TelescopePrompt": v:false, \ } as a temporary workaround.

Thank you. It helped me to deactivate codeium in telescope prompt. For those willing to do this for codeium.nvim, here is the code:

require("codeium").setup({
    virtual_text = {
        enabled = true,
        filetypes = {
          TelescopePrompt = false,
        },
    },  
})

pabroux avatar Mar 25 '25 19:03 pabroux