Comments (31)
@naquad Hi, thanks for your informative reply. Now I got what you meant and I think it's a good idea to achieve the effect/functionality as your picture shows. I will take a look at how to implement a source for nvim-cmp first, and if it's within my current ability I will try to contribute. After that maybe I can provide practical suggestions for the other plugins you mentioned.
from codeium.vim.
Can we re-open this? https://github.com/jcdickinson/codeium.nvim was deprecated today
from codeium.vim.
Hi, I think this plugin can be used without all the plugins you mentioned. That is: Codeium.vim doesn't depend on those plugins.
Exactly! So instead of a single completion system where all the possible completion options are set one has to figure out how to work with two completions in parallel. This is super inconvenient and kills any usage, at least for me.
It would be great if this plugin would provide an API, so one could integrate other completion engines.
I'm saying this after trying out TabNine with its multiline completion as a virtual text. It was incredibly hard to use as I had two separate sets of keys to confirm the completion and select the options. It makes more sense to have a single completion plugin and everything else should be a source.
Regarding the multiline options and the menu: it actually works ok:
As you can see the multiline snippet is simply displayed aside from the option.
from codeium.vim.
@pqn In short, I probably cannot help much regarding implementing a Exafunction/codeium.vim
source for hrsh7th/nvim-cmp
. These are some completion sources for hrsh7th/nvim-cmp
that I used as references to understand its complexity:
- hrsh7th/cmp-path
- tzachar/cmp-tabnine
- zbirenbaum/copilot-cmp (mentioned in the comment above)
and these are my observations:
[hrsh7th/cmp-path]
is a good starting point to understand how to create a source forhrsh7th/nvim-cmp
.- we can (as these seem to be optional) provide both
source.get_trigger_characters
,source.get_keyword_pattern
to decide when to add/trigger a source so those items generated by it will be populated into the completion menu ofhrsh7th/nvim-cmp
. - we can use
source.resolve
to modify the data of the menu item that is hovered but not yet selected.hrsh7th/cmp-path
uses this method to show a preview if the hovered item is a file. (just like the comment above)
- we can (as these seem to be optional) provide both
- In short, both
[tzachar/cmp-tabnine]
,[zbirenbaum/copilot-cmp]
are beyond my current ability, since many things need to be considered and this is better done by you guys.[tzachar/cmp-tabnine]
provides an optionrun_on_every_keystroke
to decide "whether to request the server on every keystroke" (it'strue
by default for better UX, according to the author). And it can show the strength of prediction(confidence on the output?) by optionshow_prediction_strength
.[zbirenbaum/copilot-cmp]
I haven't finished my reading but I have to admit that this is simply beyond my current ability. It has a file to add callbacks tovim.lsp.handlers
, and I don't know much about those details regarding LSP on NeoVim currently 🥲.
It will be a good idea to consult these authors instead regarding implementing a source. (I will try my best to create one recently, but it will probably not be robust enough for real use cases)
from codeium.vim.
I'm not sure if this is relevant but there's a native Neovim extension for Codeium that seems to support passing it as a nvim-cmp
source.
from codeium.vim.
I agree with @naquad here. When I was asked on Discord to test the plugin the first thing that stood out to me was it not being usable as a custom source for nvim-cmp. The nvim-cmp auto-completion plugin comes packed with almost all the popular preconfigured NeoVIM projects here on GitHub.
For GitHub Copilot there are nvim-cmp source projects like zbirenbaum/copilot-cmp and hrsh7th/cmp-copilot.
Having Codeium as a nvim-cmp source not only helps with having a single solution for auto-completion, it also allows for a list of suggestions to scroll through instead of presenting a single one.
from codeium.vim.
Hi, I think this plugin can be used without all the plugins you mentioned. That is: Codeium.vim doesn't depend on those plugins. For example, I'm a user of hrsh7th/nvim-cmp, and I can use this plugin without any special setup on the nvim-cmp side:
From my current understanding, nvim-cmp is a plugin to show a menu for completion candidate(s) from specified sources. Given that Codeium is an AI-Completion plugin, the recommendation is almost always very long with respect to the little completion menu. So, your current question doesn't look reasonable to me.
Maybe you could elaborate more on what you want to achieve.
from codeium.vim.
Hello, is anyone working on coc.nvim support?
from codeium.vim.
Thank you! I've completed the transfer to https://github.com/Exafunction/codeium.nvim, and will begin making changes soon.
I'll close this issue, as any further usability issues/bug reports can be sent to the new repo.
from codeium.vim.
I'm using it currently, works great. And yes, it does support multiline completions, although they're somewhat tricky to trigger but that doesn't seem to be plugin-related.
from codeium.vim.
I think COC support would be needed as well to also support Vim and not just Neovim
from codeium.vim.
https://github.com/Shougo/ddc-source-codeium
I have added ddc.vim
completion engine support.
from codeium.vim.
I have stopped using nvim due to configuration burnout.
from codeium.vim.
@nyngwang are you taking a look at nvim-cmp right now?
Yes, I haven't finished it yet.
Awesome, feel free to message in our Discord if you have any questions.
from codeium.vim.
Thanks for sharing @nyngwang, good stuff. Even a basic implementation with one suggestion at the top of the list would be perfect. Maybe this youtube video can help: https://www.youtube.com/watch?v=gAsYolNrjtQ .
Is there some documentation on how to access the Codeium REST API? I can imagine struggling the most with the authentication if I were to make one of these.
from codeium.vim.
@naquad and @AnoRebel, You're both right, depends on the language it seems.
from codeium.vim.
@nyngwang are you taking a look at nvim-cmp right now? (cc @sullivan-sean)
IIUC the right interface for coc.nvim/coq.nvim is probably an LSP? We're evaluating this right now.
from codeium.vim.
@nyngwang are you taking a look at nvim-cmp right now?
Yes, I haven't finished it yet.
from codeium.vim.
@nyngwang Appreciate the notes. Sounds like maybe it's best that this fall to us.
from codeium.vim.
@Zundrium you can see our authentication code here:
codeium.vim/autoload/codeium/command.vim
Line 51 in 5aced5b
We don't have public documentation of the REST protocol right now, not sure if we plan on it soon (cc @fortenforge).
from codeium.vim.
Seems to work for single line suggestions, nice catch @AnoRebel!
from codeium.vim.
@Zundrium Thanks, the author says it supports multiline too. 🤔
See this comment
from codeium.vim.
Indeed. I was barely able to squeeze out the multiline for JS after a bunch of tries:
Multiline completions are VERY context-dependent and sometimes even give you results from the other languages.
I think the ticket can be closed.
from codeium.vim.
@Shougo Thanks! Could you add ddc-vim tag so it's easier to find it?
I have added
ddc.vim
completion engine support.
from codeium.vim.
I have added it.
from codeium.vim.
I just heard about this today, and added a codeium
-> LSP
translation layer.
https://github.com/ms-jpq/coq.thirdparty/tree/3p#codeium
Not sure how well my approach works though, im just spamming the codeium#Complete
button as fast as the user is typing.
That seems to be working ok for copilot though. I guess ill keep using it for a while before I put it in the description of my main repo.
from codeium.vim.
We'll have to discuss internally if we have the cycles to maintain this repo. At the very least, maybe we can consider a repo transfer to our GitHub organization to keep the issues alive, with the possibility of re-transfer later to a community maintainer who is more knowledgeable about Lua than our team. It's easy enough for us to keep the language server binary up to date if we owned the repo though.
from codeium.vim.
@jcdickinson would you be open to such an arrangement?
from codeium.vim.
Understood. To clarify, for the continued users of your plugin, would you be open to repository transfer to our GH organization so we can take a stab at the maintenance?
from codeium.vim.
@pqn I tried to transfer it to exafunction, but it looks like I would need permissions on your side. I have transferred it to you instead.
from codeium.vim.
Feel free to change the copyright and anything else you want.
from codeium.vim.
Related Issues (20)
- Right arrow = Tab? HOT 15
- Improve docs for installation options HOT 2
- Commit: `c2bcccd9348fe0a45f39ed56df64a0f3bb309c4f` breaks codeium on Neovim HOT 3
- codeium doesn't work in vim , breaks rightarrow move in insert mode HOT 1
- null string error
- Reverting to commit `289eb72` no longer works HOT 4
- Codeium is not working HOT 1
- '$HOME' directory in my "$HOME"
- Inibition shortcut HOT 2
- where do get auth token?
- Missing chat language server URL.
- It always duplicates the current row within the return statement when I exit insert mode after accepting its suggestion when I destructure props within function param (typescriptreact) HOT 1
- Codeium auth issue HOT 1
- Whether Zed will be supported?
- Hi HOT 1
- Support For Zed?
- Does not work on Neovim HOT 4
- language server error HOT 1
- A possible resolution of tab completion HOT 3
- Language Server Failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeium.vim.