TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
625 stars 25 forks source link

feat: update the phantom while typing #62

Open timfjord opened 1 year ago

timfjord commented 1 year ago

Closes #52

This PR tries to emulate VSCode when the phantom(ghost) text is updated while typing(without triggering an extra request).
Unfortunately, due to the phantom API limitations, it is currently not possible(see the attached video)

https://user-images.githubusercontent.com/471335/194121909-c98ed8eb-4ae7-4221-ac32-b7bd7a1b7cfa.mov

The main problem is that the cursor always jumps when updating the phantom in real time.

timfjord commented 1 year ago

I opened it just to have some reference but, in general, this PR should be merged only when the problem with the cursor is fixed(see https://github.com/sublimehq/sublime_text/issues/5536 and https://github.com/TheSecEng/LSP-copilot/issues/54)

jfcherng commented 1 year ago

I feel, at this moment, the UX in the video is worse than without this PR.

timfjord commented 1 year ago

Just in case, here is how it works in VSCode

https://user-images.githubusercontent.com/471335/194123754-1cc878d3-dd7a-4681-9f87-242237fa4a1e.mov

timfjord commented 1 year ago

Yes, it is horrible. That's why we shouldn't merge this one.

We could close it, as I opened it purely to have some reference

jfcherng commented 1 year ago

We could close it, as I opened it purely to have some reference

Keep it open is fine to help us remember this 😄