zbirenbaum / copilot-cmp

Lua plugin to turn github copilot into a cmp source
MIT License
1.13k stars 41 forks source link

Follow-up lines duplicate characters and have weird indent #66

Closed lars-vc closed 1 year ago

lars-vc commented 1 year ago

When accepting follow-up suggestions (on an empty line) weird behaviour occurs. I have the following mapping setup in cmp:

    ["<Tab>"] = cmp.mapping(function(fallback)
        if cmp.visible() then
            cmp.confirm({ select = true, behavior = cmp.ConfirmBehavior.Replace })
        else
            fallback()
        end
    end, { "i", "c" }),

https://user-images.githubusercontent.com/57136208/235098170-06b51bc7-5578-4eb1-961b-6f180fef7352.mp4

cuongn265 commented 1 year ago

can confirm same issue here

zbirenbaum commented 1 year ago

Please test #67 or checkout the formatting-fixes branch and see if it fixes your issue.

lars-vc commented 1 year ago

This indeed fixes the issues! I will leave this issue open til the pr is merged, so others can fix this too.

codeDude64 commented 1 year ago

I confirm the branch formatting-fixes branch doesn't have this issue.

benwoodward commented 1 year ago

Fixed it for me! Thanks for your efforts on this plugin @zbirenbaum, wouldn't get half as much done without it.

cuongn265 commented 1 year ago

can confirm it's fixed on the new branch, thank you so much @zbirenbaum

zbirenbaum commented 1 year ago

closed via #67