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

feat: inline virtual text suggestion similar to codeium.vim project #14

Closed
rlb101001 opened this issue Jan 31, 2023 · 8 comments · Fixed by #241
Closed

feat: inline virtual text suggestion similar to codeium.vim project #14

rlb101001 opened this issue Jan 31, 2023 · 8 comments · Fixed by #241
Labels
enhancement New feature or request

Comments

@rlb101001
Copy link

Awesome plugin, thank you a lot.

Would it be possible to get suggestions the same way as in codeium.vim project? cmp is awesome but you need start typing or press C-Space to see suggestions, and suggestions are shown not in the first positions of a long list.

@jcdickinson
Copy link
Contributor

I plan to do this eventually, but given that codeium.vim already does this, it's pretty low on my priority list.

@jcdickinson jcdickinson added the enhancement New feature or request label Feb 1, 2023
@sigmaSd
Copy link

sigmaSd commented Mar 9, 2023

Hello, thanks for this plugin, just want to say that codeium.vim completion is very buggy, so it would be great if we had a native counterpart (if that's going to improve things)

@hanspinckaers
Copy link

Hi all, you can enable this feature in cmp itself using:

cmp.setup {
  experimental = {
    ghost_text = {hlgroup = "Comment"}
  }
}

Screenshot 2023-03-09 at 10 30 55

Now I have to find how to accept multiline completions..

@zettlrobert
Copy link

@rlb101001 define the cases in which you want suggestions to appear, if that is set you could create some autocommands and fitting augroups to trigger the completion for example on new line after comment

@2nthony
Copy link

2nthony commented Jul 5, 2023

This feature would be awesome! I feel the codeium.vim experience is not good enough 🥲

Similar to copilot.vim, I think that's why https://github.com/zbirenbaum/copilot.lua exists.

@chrisgrieser
Copy link
Contributor

codeium.nvim with ghost text still isn't on the same level as codium.vim, ascmp's suggestions to not appear on empty lines, and hacking together manual triggering via autocmd also isn't ideal.

Even though it is really wasteful, I actually do run both plugins at the same time right now. I added this snippet to prevent too much interference between the two:

-- when cmp completion is loaded, clear the virtual text from codium
require("cmp").event:on("menu_opened", function() vim.fn["codeium#Clear"]() end)

I also made this FR upstream at cmp, which is about indicating if content is multi-line, something which would be quite relevant for this as well: hrsh7th/nvim-cmp#1636

@toshmukhamedov
Copy link

+1

@dimfeld
Copy link
Contributor

dimfeld commented Oct 7, 2024

I have a draft PR in #241 which implements this. There's still some work left for it to be ready, but I believe the core functionality is all working if anyone wants to try it out.

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

Successfully merging a pull request may close this issue.

9 participants