Exafunction / codeium.nvim

A native neovim extension for Codeium
MIT License
658 stars 50 forks source link

Trigger length is much longer compared to Codeium #47

Closed TroySigX closed 1 year ago

TroySigX commented 1 year ago

In order to trigger codeium.nvim's multiline suggestions, I need to write a lot of characters first. Here's my case, open a cpp file and type:

void sieve(){
}

In the function body, when typing for only (first thing to do to make a sieve):

void sieve(){
    for
}

I would expect codeium.nvim to suggest the rest of the function (like codeium on browser did), but in fact, it just suggested 1-line suggestion. But then I tried typing more characters, e.g for(int:

void sieve(){
    for(int 
}

It starts working properly and suggests multiline suggestions. Is there a way to fix it?

jcdickinson commented 1 year ago

The problem is actually the interaction between Codeium and cmp. Right now you will get suggestions beginning from the start of the current word, e.g. in your last suggestion the suggestions actually begin at the $ sign:

void sieve(){
    for($int 
}

This means that if Codeium suggested something that doesn't begin with int, cmp will filter it out. I'm not sure how to fix this.

TroySigX commented 1 year ago

I'm sorry for the confusing title, but what I meant was, typing shorter word (e.g for) will only trigger codeium to suggest 1-line suggestions, but typing longer ones (e.g for(int) will also make codeium to suggest multi-line suggestions.