leona / helix-gpt

Code assistant language server for Helix with support for Copilot/OpenAI/Codeium/Ollama
MIT License
285 stars 19 forks source link

Provides normal code completion while waiting for gpt to complete the code #14

Open LeeeSe opened 5 months ago

LeeeSe commented 5 months ago

Is your feature request related to a problem? Please describe. After adding helix-gpt, I always have to wait a long time for the patch window to pop up due to network issues, not only for gpt patches, but also for the ones provided by rust-ana, which can be very disruptive to my normal use.

Describe the solution you'd like I'd like gpt's complement options to be inserted into the complement list asynchronously after loading is complete

Describe alternatives you've considered I'm not sure that helix provides the ability to do that

Additional context In lazyvim, the ai-provided patches are dynamically added to the code completion list, and I can choose between that and the other options provided by traditional lsp.

leona commented 5 months ago

That would be a good improvement alright, especially for openai which is a little slow. I'll look into this today.

leona commented 5 months ago

After some digging, I'm not sure if there's a straightforward solution, and I think it might be a Helix limitation.

Main annoyance I have with this is waiting for . triggers to come through when I just want to quickly see what properties something has for example. Would removing . as a trigger character solve some of the problems you're having too?

LeeeSe commented 5 months ago

What you've said is indeed a way to alleviate the problem, and it is recommended that a configuration option be added to allow users to choose their own trigger words

I'm going to remove all trigger words and have the gpt code completion triggered entirely by shortcuts

leona commented 5 months ago

What you've said is indeed a way to alleviate the problem, and it is recommended that a configuration option be added to allow users to choose their own trigger words

I'm going to remove all trigger words and have the gpt code completion triggered entirely by shortcuts

Have added a --triggerCharacters config option now too. Available in 0.23 Although you might still get some automatic completions, as I think there is a default character list I can't overwrite.

I've added this to the todo list anyway and will keep an eye out for any solutions to the original request.

LeeeSe commented 5 months ago

In fact, even if you're just writing a variable name and then suddenly stop, gpt will start working immediately.

Even if no trigger word is pressed in the meantime