Closed EngoDev closed 1 year ago
I got the same error yesterday . Hope this can be fixed ASAP.
I checked in source.lua and this is what I found:
local completion_fn = opts.method or "getCompletionsCycling"
opts.method is the field corresponding to your configuration options. This is a config issue.
Since there's no longer multiple completion_fn options implemented due to changes in copilot itself, I went ahead and pushed a change which will make it impossible to override the value.
I kind-of want to keep it the way it is so people can write their own completion methods if they want, but I think it is more trouble than it is work atm.
Hello :) I recently updated my plugins and after I did I was met with the following error![image](https://user-images.githubusercontent.com/14925957/227220251-8f4244de-13aa-4659-a169-785a428b4d0c.png)
I did some investigating in the code and found the bug and I have a fix for it: In
source.lua
line 57opts.method
gives the valuegetCompletionCycling
and notgetCompletionsCycling
(The difference is the singular Completion vs Completions). Then when it's passed down tocompletion_functions.init
in line 88, completion_functions don't have the methodgetCompletionCycling
so everything returns back nil which causes the mentioned error above when trying to call thecomplete
function fromsource
I would love to create a pull request for the fix myself but if that's not possible I can provide snippets for the fix :)
Thank you for making an amazing plugin, I use it everyday ⭐ 😁