Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the display text into regions and display with multiple phantoms #53

Open
timfjord opened this issue Aug 17, 2022 · 6 comments
Open
Labels
enhancement New feature or request phantom Phatom related stuff

Comments

@timfjord
Copy link
Collaborator

timfjord commented Aug 17, 2022

Scenarios

image

Expected regions: nt"

image

Expected regions: nil values and do

@timfjord timfjord added enhancement New feature or request phantom Phatom related stuff labels Aug 17, 2022
@TerminalFi
Copy link
Owner

FYI, this wouldn't work if the completion is longer than lines in the view. So if the view is 3 lines long and the completion is 5 lines, it would need to be split into 3 regions.

Region 1: 1 Line
Region 2: 1 Line
Region 3: 3 Lines

@jfcherng
Copy link
Collaborator

jfcherng commented Aug 25, 2022

I think he means inline completion gives a single phantom which contains text already in the view atm.

@timfjord
Copy link
Collaborator Author

timfjord commented Sep 5, 2022

Yeah, the idea of this issue is to parse the completion text before displaying the ghost text.
Currently, we show the entire string from the payload, but, when, for example, you are in the middle of the line and there is a trailing text, most of the time the ghost text is confusing

image

Like on the picture above, the ( symbol shouldn't be part of the completion

I will add more details to the issue later on.

Also, most likely this issue is valid only for single-line completion.

@TerminalFi
Copy link
Owner

I'll take a stab at this

@TerminalFi TerminalFi self-assigned this Sep 5, 2022
@timfjord
Copy link
Collaborator Author

timfjord commented Sep 5, 2022

There is also an extreme case when you a completion should be split into multiple regions.
I will try to send a screenshot when I reproduce it

@timfjord
Copy link
Collaborator Author

timfjord commented Sep 5, 2022

@TheSecEng I've added some scenarios to the card description.

@TerminalFi TerminalFi removed their assignment Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request phantom Phatom related stuff
Projects
None yet
Development

No branches or pull requests

3 participants