Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shows a lot of errors on new file #262

Closed
mister-choo opened this issue Nov 12, 2024 · 4 comments · Fixed by #271
Closed

Shows a lot of errors on new file #262

mister-choo opened this issue Nov 12, 2024 · 4 comments · Fixed by #271

Comments

@mister-choo
Copy link

When I start nvim without arguments and start typing there are a lot of errors from Codeium

@eb0687
Copy link

eb0687 commented Nov 17, 2024

Sorry to hijack but this could be a related error?

I get a bunch of errors when I am working on a file with no filetype, for example when I run :enew and just start writing stuff I get the below error when reviewing :messages

[codeium/codeium] [ERROR 12:36:15] /home/eb/.local/share/nvim/lazy/codeium.nvim/lua/codeium/notify.lua:14: completion request failed:  {
[codeium/codeium]   code = 0,
[codeium/codeium]   out = '{"code":"unknown","message":"invalid_argument: path is empty"}',
[codeium/codeium]   response = {
[codeium/codeium]     body = '{"code":"unknown","message":"invalid_argument: path is empty"}',
[codeium/codeium]     exit = 0,
[codeium/codeium]     headers = { "Accept-Encoding: gzip", "Content-Type: application/json", "Vary: Origin", "Date: Sun, 17 Nov 2024 09:36:15 GMT", "Content-Length: 62", "", "" },
[codeium/codeium]     status = 500
[codeium/codeium]   },
[codeium/codeium]   status = 500
[codeium/codeium] }
[codeium/codeium] [ERROR 12:36:17] /home/eb/.local/share/nvim/lazy/codeium.nvim/lua/codeium/notify.lua:14: completion request failed:  {
[codeium/codeium]   code = 0,
[codeium/codeium]   out = '{"code":"unknown","message":"invalid_argument: path is empty"}',
[codeium/codeium]   response = {
[codeium/codeium]     body = '{"code":"unknown","message":"invalid_argument: path is empty"}',
[codeium/codeium]     exit = 0,
[codeium/codeium]     headers = { "Accept-Encoding: gzip", "Content-Type: application/json", "Vary: Origin", "Date: Sun, 17 Nov 2024 09:36:17 GMT", "Content-Length: 62", "", "" },
[codeium/codeium]     status = 500
[codeium/codeium]   },
[codeium/codeium]   status = 500
[codeium/codeium] }
[codeium/codeium] [ERROR 12:36:18] /home/eb/.local/share/nvim/lazy/codeium.nvim/lua/codeium/notify.lua:14: completion request failed:  {
[codeium/codeium]   code = 0,
[codeium/codeium]   out = '{"code":"unknown","message":"invalid_argument: path is empty"}',
[codeium/codeium]   response = {
[codeium/codeium]     body = '{"code":"unknown","message":"invalid_argument: path is empty"}',
[codeium/codeium]     exit = 0,
[codeium/codeium]     headers = { "Accept-Encoding: gzip", "Content-Type: application/json", "Vary: Origin", "Date: Sun, 17 Nov 2024 09:36:18 GMT", "Content-Length: 62", "", "" },
[codeium/codeium]     status = 500
[codeium/codeium]   },
[codeium/codeium]   status = 500
[codeium/codeium] }

@mister-choo
Copy link
Author

Yeah, that's definitely the same issue

@aliaksandr-trush
Copy link
Contributor

Looks like server limitation:
API requires path to a file, but Vim/Neovim is able to edit buffer just in memory, before actual file creation.

@theherk
Copy link

theherk commented Dec 20, 2024

I suspect this is the same issue causing the errors when inserting in command history mode, q:. So, I'm looking forward to #271.

In the meantime, a workaround for that is:

cmp.setup.filetype("vim", {
    sources = vim.tbl_filter(function(source) return source.name ~= "codeium" end, opts.sources),
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants