zbirenbaum / copilot-cmp

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

fix: remove trim indent for nvim-cmp confirm #91

Closed fengwk closed 10 months ago

fengwk commented 10 months ago

I encountered some issues with auto-completion. nvim-cmp was incorrectly truncating and completing, and after investigation, I found that trimming was being done when returning Copilot data. This caused an error judgment in nvim-cmp core.lua at line 377. It would consider the completion word as part of the prefix. The following screenshot demonstrates this error.

Step1.

e2a1db10b585e33b8b1d73d5fa99f762

Step2.

de477a119b5143c04e9e1aef30d5abc9

zbirenbaum commented 10 months ago

This didn't fix some the other issues that come up regarding indentation, although it did address #90. #92 should behave the same as this in most cases, but also includes some additional fixes and (relative) cleanup. Can you test it out and see if you have any issues? If you find some I'll merge this while I fix it.

zbirenbaum commented 10 months ago

Closing since #92 fixed this as well as a couple other things

fengwk commented 10 months ago

Indeed, it is fixed.