Code Monkey home page Code Monkey logo

Comments (31)

nyngwang avatar nyngwang commented on August 23, 2024 15

@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.

caheredia avatar caheredia commented on August 23, 2024 13

Can we re-open this? https://github.com/jcdickinson/codeium.nvim was deprecated today

from codeium.vim.

naquad avatar naquad commented on August 23, 2024 11

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:
image

As you can see the multiline snippet is simply displayed aside from the option.

from codeium.vim.

nyngwang avatar nyngwang commented on August 23, 2024 8

@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:

and these are my observations:

  • [hrsh7th/cmp-path] is a good starting point to understand how to create a source for hrsh7th/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 of hrsh7th/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)
  • 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 option run_on_every_keystroke to decide "whether to request the server on every keystroke" (it's true by default for better UX, according to the author). And it can show the strength of prediction(confidence on the output?) by option show_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 to vim.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.

AnoRebel avatar AnoRebel commented on August 23, 2024 7

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.

Zundrium avatar Zundrium commented on August 23, 2024 5

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.

nyngwang avatar nyngwang commented on August 23, 2024 4

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.

yingmanwumen avatar yingmanwumen commented on August 23, 2024 4

Hello, is anyone working on coc.nvim support?

from codeium.vim.

pqn avatar pqn commented on August 23, 2024 4

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.

naquad avatar naquad commented on August 23, 2024 3

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.

image

from codeium.vim.

jclsn avatar jclsn commented on August 23, 2024 3

I think COC support would be needed as well to also support Vim and not just Neovim

from codeium.vim.

Shougo avatar Shougo commented on August 23, 2024 3

https://github.com/Shougo/ddc-source-codeium

I have added ddc.vim completion engine support.

from codeium.vim.

jcdickinson avatar jcdickinson commented on August 23, 2024 2

I have stopped using nvim due to configuration burnout.

from codeium.vim.

pqn avatar pqn commented on August 23, 2024 1

@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.

Zundrium avatar Zundrium commented on August 23, 2024 1

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.

Zundrium avatar Zundrium commented on August 23, 2024 1

@naquad and @AnoRebel, You're both right, depends on the language it seems.

from codeium.vim.

pqn avatar pqn commented on August 23, 2024

@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 avatar nyngwang commented on August 23, 2024

@nyngwang are you taking a look at nvim-cmp right now?

Yes, I haven't finished it yet.

from codeium.vim.

pqn avatar pqn commented on August 23, 2024

@nyngwang Appreciate the notes. Sounds like maybe it's best that this fall to us.

from codeium.vim.

pqn avatar pqn commented on August 23, 2024

@Zundrium you can see our authentication code here:

function! s:commands.Auth(...) abort

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.

Zundrium avatar Zundrium commented on August 23, 2024

image
Seems to work for single line suggestions, nice catch @AnoRebel!

from codeium.vim.

AnoRebel avatar AnoRebel commented on August 23, 2024

@Zundrium Thanks, the author says it supports multiline too. 🤔
See this comment

from codeium.vim.

naquad avatar naquad commented on August 23, 2024

Indeed. I was barely able to squeeze out the multiline for JS after a bunch of tries:

image

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.

chunxuan-hs avatar chunxuan-hs commented on August 23, 2024

@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.

Shougo avatar Shougo commented on August 23, 2024

I have added it.

from codeium.vim.

ms-jpq avatar ms-jpq commented on August 23, 2024

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.

pqn avatar pqn commented on August 23, 2024

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.

pqn avatar pqn commented on August 23, 2024

@jcdickinson would you be open to such an arrangement?

from codeium.vim.

pqn avatar pqn commented on August 23, 2024

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.

jcdickinson avatar jcdickinson commented on August 23, 2024

@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.

jcdickinson avatar jcdickinson commented on August 23, 2024

Feel free to change the copyright and anything else you want.

from codeium.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.