LSP-copilot icon indicating copy to clipboard operation
LSP-copilot copied to clipboard

feat: update the phantom while typing

Open timfjord opened this issue 2 years ago • 5 comments

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 avatar Oct 05 '22 17:10 timfjord

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)

timfjord avatar Oct 05 '22 17:10 timfjord

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

jfcherng avatar Oct 05 '22 17:10 jfcherng

Just in case, here is how it works in VSCode

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

timfjord avatar Oct 05 '22 17:10 timfjord

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

timfjord avatar Oct 05 '22 17:10 timfjord

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

Keep it open is fine to help us remember this 😄

jfcherng avatar Oct 05 '22 17:10 jfcherng