zbirenbaum / copilot-cmp

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

Using cmp replace behaviour does not fix trailing character #65

Closed lars-vc closed 1 year ago

lars-vc commented 1 year ago

I saw issue #22 and have similar problems, I have the following mapping setup in cmp (this fixed the indent issue #45)

    ["<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/235096016-f77ef2c3-9783-4abd-a6f5-25c7359616eb.mp4

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.