rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.65k stars 1.09k forks source link

Github Copilot ghost text does not wrap long lines #13678

Open parmsam opened 12 months ago

parmsam commented 12 months ago

System details

RStudio Edition : Desktop 
RStudio Version : 2023.09.0+463
OS Version      :  macOS Ventura 13.4.1
R Version       : 4.3.0

Steps to reproduce the problem

Describe the problem in detail

Describe the behavior you expected

Noticed that big chunks of ghost text do not soft wrap for the RStudio Github Copilot feature. I expect the ghost text to also soft warp so that it is readable, since I cannot side scroll in soft-wrap mode. Thanks!

ronblum commented 12 months ago

@parmsam Thank you for raising this! We'll review this as we continue our integration with Copilot.

Also, I appreciate your example. I often use the lyrics to "Cabaret" in my testing. 🙂

kevinushey commented 6 months ago

Ace implements its display of ghost text by adding a custom token here:

https://github.com/rstudio/rstudio-ace/blob/68d8258192a24f138dce58bd0c032942ade67f74/src/virtual_renderer.js#L1761

Unfortunately, the way Ace chooses to insert the ghost text does not support soft wrapping. We could try to implement a patch for this, but I'd propose this be handled upstream.