Exafunction / codeium.nvim

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

Completion on a file that has no type gives errors #12

Closed arnevm123 closed 1 year ago

arnevm123 commented 1 year ago

Whenever I'm in a file with no extension and I type I get this error:

completion request failed
[codeium] [ERROR 21:48:30] ...ocal/share/nvim/lazy/codeium.nvim/lua/codeium/notify.lua:14: completion request failed:  {
[codeium]   code = 0,
[codeium]   out = '{"code":"invalid_argument","message":"invalid GetCompletionsRequest.Document: embedded message failed validation | caused by: invalid Document.EditorLanguage: value length must be at least 1 runes"}',
[codeium]   response = {
[codeium]     body = '{"code":"invalid_argument","message":"invalid GetCompletionsRequest.Document: embedded message failed validation | caused by: invalid Document
.EditorLanguage: value length must be at least 1 runes"}',
[codeium]     exit = 0,
[codeium]     headers = { "Accept-Encoding: gzip", "Content-Type: application/json", "Vary: Origin", "Date: Mon, 30 Jan 2023 20:47:43 GMT", "Content-Length: 198", "
", "" },
[codeium]     status = 400
[codeium]   },
[codeium]   status = 400
[codeium] }

It seems like there's some issues because the name of the language is to short. Please let me know if you need any more info on this. I don't have time tonight to get a minimal config for this, but I might tomorrow if needed.

jcdickinson commented 1 year ago

Thanks for the report, I'll see if I can repro this tonight

jcdickinson commented 1 year ago

This should be fixed. Let me know :)

arnevm123 commented 1 year ago

Yep, works like a charm! Thanks! (Also for this awesome plugin :D )