exafunction / codeium.vim Goto Github PK
View Code? Open in Web Editor NEWFree, ultrafast Copilot alternative for Vim and Neovim
Home Page: https://codeium.com
License: MIT License
Free, ultrafast Copilot alternative for Vim and Neovim
Home Page: https://codeium.com
License: MIT License
I just discovered that codium by default and without informing the user stores its API key in the ~/.config
directory (macOS).
Since many people, including me, make their dotfiles public as a repo on GitHub, this means that my API key has now been leaked. I removed the key from my dotfile repo, but if someone runs a crawler on GitHub repos, they now have my API key.
Storing API keys in directories intended for config files is generally not a good idea, because many people publish their dotfiles, which will inevitably result in API key leakages. API keys should only be stored in directories intended for user data, not user config for this reason.
I only noticed that this happend since I installed the codium plugin on my home device and was surprised that it worked out of the box without needing to authenticate. I am pretty sure that other people, who also publish their dotfiles, now also have their API keys leaked, they only probably did not notice it yet.
ConfigDir should respect $XDG_CONFIG_HOME for creating .codeium/
$HOME can be a fallback.
With longer files (>50k lines) it starts to take longer and longer time to render reposes.
I attach short movie:
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)
Whenever I try to login, follow the login steps it gives me the error Object does not exist at path: "/org/freedesktop/secrets/collection/login"
I would apprecieate any help.
os: ubuntu 14
Hi!
I've been trying out codeium and codeium.nvim, and there's one thing that's very problematic, I'm not sure if it's a setting on my side or a more generalized problem, but when I get a suggestion and decide not to go with it, if I start typing, I can't see what I'm typing because the suggestion stays on top of that.
Here's a video showing what I'm describing:
On pressing alt-\
neovim complains with:
E107: Missing parentheses: codeium#Complete
I believe this is because of line 43 of https://github.com/Exafunction/codeium.vim/blob/main/plugin/codeium.vim
There should be parentheses before the carriage return.
However, even after I added this, the keybind now just silently does nothing for me.
Other keybinds defined here (alt-]
, alt-[
, and ctrl-]
) all work fine.
Codeium commit: bfc1297
Neovim Version: v0.8.2
Having some experience of using copilot and codeium, I found that the most productive way of using tools like these involves disabling automatic suggestions and only show them in specific places by manually triggering them.
However, with codeium I can't easily achieve this: when I set let g:codeium_enabled = v:false
, the "Manually trigger suggestion" action dosen't work anymore.
I think an animation says more than 1000 words:
As you can see, when I cancel insert mode with CTRL+C while having a suggestion, there is only one way to get rid of the suggestion which I like to call ghost suggestion: I have to go back into insert mode at the point where the suggestion is.
As much as I like Codeium (my first impression gives me appeal and satisfaction), this is a bitter piece that ships with it. I often cancel insert mode somewhere, just delete my stuff and move along, but the suggestion will remain and occupy valuable space. It also causes a lot of confusion along the way.
Possible solution: Remove all suggestions when going back into normal mode. Suggestions should only be a thing in insert mode, they should not?
Hi, I've recently started using the Codeium plugin for neovim (nvim v0.8.3 on ubuntu 22.04), it's a great plugin that has been a tremendous help to my coding workflow. However, I've encountered an issue multiple times (at least 100 times, in rust/lua/go/typescript, etc.) where the plugin seems to be deleting lines or characters and sometimes even reversing the order of neighbouring lines when I insert a suggestion.
I have recorded a short video that demonstrates one of the problems. There are several other cases where similar issues have occurred.
I'm not sure if this is a bug in the plugin or if I'm doing something wrong, but it's causing some frustration. I would appreciate it if you could take a look at this issue and provide some guidance or assistance.
Thank you for creating this plugin, it has been a great help to my coding, and I look forward to using it more in the future.
Failed to source /home/itznesbro/.local/share/nvim/lazy/codeium.vim/plugin/codeium.vim
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:346: Vim(let):E903: Process
failed to start: no such file or directory: "/home/itznesbro/.codeium/bin/0a0cf69c54bd02
be577e1240463b85d782fa5475/language_server_linux_arm"
Exception: Vim(return):E903: Process failed to start: argument list too long: "curl" [function codeium#Complete[42]..codeium#server#Request, line 14]
Exception: Vim(return):E903: Process failed to start: argument list too long: "curl" [function codeium#Complete[42]..codeium#server#Request, line 14]
Exception: Vim(return):E903: Process failed to start: argument list too long: "curl" [function codeium#Complete[42]..codeium#server#Request, line 14]
I currently have the logging/telemetry turned off because I don't want to leak code from my employer. However, I would be thrilled to provide telemetry while working on my public/OSS projects.
Maybe allow this to be set with either an environment variable, or some "root file" such as a .codeiumrc
with contents such as:
telemetry = true
A very close second would be to have something like:
let g:codeium_telemetry = v:true
This would completely override the setting on the website (i.e. the value on the website is ignored if this configuration is present). This would allow a user who normally opts into telemetry to opt out, and a user who normally opts out of telemetry to opt in. Orgs could also commit this file into their repo to prevent developers from accidentally leaking private code.
I'm using codeium.vim on a server where I don't have root access. The service only allows users to run up to 200 processes. However, codeium.vim creates too many processes as shown in the attached image. I was wondering if there's a way to limit the number of processes created by Codium.
Thanks in advanece
I'm not sure what you'll do with this, but I have created a plugin specifically for Neovim and nvim-cmp: https://github.com/jcdickinson/codeium.nvim/
If you want to migrate it into the Exafunction org, I'm cool with that. If you want to link to it, I'm cool with that also. If you don't want to mention it at all, that's also fine.
After yestarday's changes, something changed in codeium.vim during gvim startup.
I usually start gvim by calling:
gvim .
then it starts gvim and control on terminal goes back to bash, so I can use it.
After recent changes, gvim blocks the terminal and I can't use it until I close gvim.
It works as expected when I remove codeium.vim.
I installed the codeium.vim , and the service has been downloaded normally. In neovim, I executed the Codeium Auth command to open the window to get the token. Paste the token, but it prompts Invalid token, please try again
Hi there,
Trying out the plugin and got a bit annoyed by the flicker when I accept a completion. Commenting out the redrawstatus lines in the code works. Not ideal, but I don't have codeium in my statusline anyway. Maybe if you move this line somewhere else it remove the flickering and can still redraw the statusline?
Thanks!
Hans
I'm seeing a "report mode settings" control sequence-looking thing: ^[[?12;4$y
inserted at the beginning of vim buffers when the plugin in activated in my vimrc via:
Plug 'Exafunction/codeium.vim'
imap <C-g> <Cmd>call codeium#Accept()<CR>
I could be misconfiguring the plugin somehow, or using incompatible tools, but this seems to be bug in the vim plugin.
The character goes away when I remove the plugin and imap call from my vimrc.
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Feb 24 2023 12:08:45)
macOS version - x86_64
Included patches: 1-1350
Iterm: Build 3.4.19
autoload/codeium/server.vim
defines s:server_job
and autoload/codeium.vim
uses s:server_job
but s:...
means script scope variable.
Error on exit: (:redir! > log.txt
)
Error detected while processing VimLeave Autocommands for "*"..function codeium#ServerLeave:
line 1:
E121: Undefined variable: s:server_job
Hi 👋 ,
Thanks for this great plugin, it's important to have a free CoPilot alternative!
Would it be possible to
codeium-dismiss
, codeium-next
and codeium-previous
?codeium-next
/codeium-previous
?Thanks again and best regards,
David
Environment
Windows 11 22H2 22621.1105
Windows Terminal
NVIM v0.8.3
Description
Code suggestion shows ^M characters at the end of each line.
Accepted code also has ^M at the end of each line
Expected
Code suggestions and accepted code contain no trailing ^M
Steps to repro
nvim fib.py
def fib(n):
when typing in a comment, I find suggestions in general not useful. At the same time, they are somewhat distracting. Could there be an option to disable codeium suggestions when typing inside a comment?
Is there any known issues that it won't work in containers/WSL? Is there anyway to check status
, say something like:
:codeium status
so that it says all okay?
Context:
:checkhealth
is all okay:Codeium Auth
prompted for key & looked like it was acceptedWhen using codeium.vim with https://github.com/windwp/nvim-autopairs, the parentness inserted from https://github.com/windwp/nvim-autopair is not visible. See the animation:
You can see that after I type (
, the right )
is visible. However, after I type array
, codeium.vim's suggestion override the )
from nvim-autopairs.
As a consequence of #16, my codium API key has now been published and therefore compromised, so I would like / should reset the key.
However, at https://www.codeium.com/profile
, I do not see any setting that allows me to reset my API key.
Since the usage of the codium does not incur any costs, potential abuse of the API key does not have direct drawbacks for me, this is somewhat mitigated. so I can live with the fact that my API key is leaked for the time being – but it should nonetheless be very much in the interest of codium that I (and other affected users) are able reset their API keys.
This is probably an issue for codium in general and not the codium (n)vim plugin, but I could not find a GitHub repo for the service in general, therefore reporting it here. Will open an issue at the respective repo, if you can direct me to it
I am trying to use this plugin together with vscode-neovim. Unfortunately, suggestions do not show up in VS Code, while they do show up if I use neovim. Has anyone else encountered this problem? How did you fix it?
Hello, can you give me some advice on how to add codeium status to lualine.nvim (https://github.com/nvim-lualine/lualine.nvim)
An essential feature would be:
This feature is missing from Copilot.
let g:codeium_disable_bindings = 1
does disable and other bindings, but
imap <C-g> <Cmd>call codeium#Accept()<CR>
does not bind ctrl-g to work.
vim version VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 18 2022 12:52:50)
It would be great if codeium register its source to nvim-cmp.
Hello, i tried to install codeium.vim on Neovim (using AstroVim) in Termux and got the following warnings:
After executing :PackerSync
When reopening neovim after :PackerSync
Although when i enter in that folder, i can find the file. I just can't execute it
The second condition of the following code is to determine whether the pop menu is currently open, why add a v:false to pumvisible(), so that it will always be false no matter what pumvisible() returns
if mode() !~# '^[iR]' || (v:false && pumvisible())
return ''
endif
NeoVIM, the same as VIM has quite a few completion plugins. It would be great to have nvim-cmp support or even X support.
It would be awesome to get either API or the boilerplate invocation code to integrate Codeium with the other completion plugins.
By boilerplate, I mean a code that would show how to properly setup the prerequisites, start, and interact with Codeium.
Thank you.
The following code for downloading and extracting the executable (located in server.vim
) does not work on windows since it doesn't have gzip
nor chmod
if empty(glob(bin))
let url = 'https://github.com/Exafunction/codeium/releases/download/language-server-v' . s:language_server_version . '/language_server_' . bin_suffix . '.gz'
call system('curl -Lo ' . bin . '.gz' . ' ' . url)
call system('gzip -d ' . bin . '.gz')
call system('chmod +x ' . bin)
if empty(glob(bin))
call codeium#log#Error('Failed to download language server binary.')
return ''
endif
endif
Is there a equivalent code for neovim?
The examples only mention for vimrc
let g:codeium_filetypes = {
\ "bash": v:false,
\ "typescript": v:true,
\ }
Copilot is actually missing this essential feature.
Please implement a hotkey so that it can be possible to autocomplete one word at a time from the one suggested by the plugin, by still displaying the whole suggestion with the grey "ghost" text, which will of course update itself whenever a user changes the next suggested word to something else.
when the plugin is enabled, it becomes impossible to insert a tab.
When running vim in iTerm2 on a Mac, no Meta key bindings work.
Because of this, the default bindings for codeium basically do not work for most Mac users.
Please consider different default bindings that do not depend on the Meta modifier working.
e.g.
Completion is interfering with typing and when using backspace.
During typing, it enters chars at the end of line, then redraw it correctly.
During using backspace, it puts remaining part of suggestion to the next line and everything below just "jumps".
Here is short video showing this behavior:
Originally posted by @klew in #42 (comment)
:Codeium Disable
:Codeium Disable
it's not working in neovim termux, on the statusline it says ON but the autocomplete never appears.
but when i run my laptop in termux under ssh it's working, Maybe there are dependencies that are not installed yet in termux, but I don't know
To reproduce:
codeium
(as shown in the beginning of the video, auto-completion works)<cmd>lua require('telescope.builtin').git_files()<CR>
with C-g
for finding files in Telescope
dfdfdf
)After disabling codeium
, I no longer have this issue.
Any input is much appreciated. Thank you.
Just after installing this plugin, My neovim in WLS just hanging. It just stopped responding to anything. I guess that it may downloading the codeium server. But It just stops the whole NeoVim, maybe there are better way to deal with this. Thx!
Error detected while processing function codeium#server#Start[30]..<SNR>70_ActuallyStart:
line 14:
E903: Process failed to start: unknown error: "C:\Users\choij/.codeium/bin/daf4912ada2a4934c00b8c5a321cec4998a15e70/language_server_windows_x64.exe"
is printed as soon as I start Neovim and the plugin doesn't work
Environment:
Windows 11
neovim 0.8.3
Config: .config/nvim
NVIM Versión: v0.9.0-dev-829+gaec4b476c
Virtual text suggestion between [], cursor |:
fn factorial_recursive (n: u64) -> u64 {
match n {
0 => 1,
_ => n * factorial_recursive(n-1)
};
ma|[tch n {
}]
}
call codeium#Accept
fn factorial_recursive (n: u64) -> u64 {
match n {
0 => 1,
_ => n * factorial_recursive(n-1)
};
match n {|
}
rust code but same in typescript and ...
My config as shown below doesn't work, i.e., when I click the tab key, auto suggestion is still accepted.
May I ask if my config is correct?
use {
'Exafunction/codeium.vim',
config = function ()
vim.g.codeium_disable_bindings = true
vim.g.codeium_no_map_tab = true
vim.keymap.set('i', '<c-g>', function() return vim.fn['codeium#Accept']() end, { expr = true })
vim.keymap.set('i', '<c-/>', function() return vim.fn['codeium#CycleCompletions'](1) end, { expr = true })
vim.keymap.set('i', '<c-;>', function() return vim.fn['codeium#CycleCompletions'](-1) end, { expr = true })
vim.keymap.set('i', '<c-x>', function() return vim.fn['codeium#Clear']() end, { expr = true })
end
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.