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

Suggestion virtual text between a pair #322

Open
aymanbagabas opened this issue Sep 25, 2024 · 0 comments
Open

Suggestion virtual text between a pair #322

aymanbagabas opened this issue Sep 25, 2024 · 0 comments

Comments

@aymanbagabas
Copy link

When copilot.lua offers a suggestion where the cursor is between a pair, it hides the closing pair as if it's not there at all offering the suggestion over the existing closing pair.

image

Here I'm using mini.pairs, after typing csi.Param(, it completes the parenthesis and adds a ) automatically. Now, the cursor is at if csi.Params(|) and Copilot offers 0) != 0 { as a suggestion. The issue here is that copilot.lua ignores the existence of the closing parenthesis as noted by the MatchParen highlight, and offers the suggestion over the closing pair.

Instead, I think copilot.lua should split the suggestion into two parts, first the 0, and second the != 0 { inserting placeholders for the suggestions similar to how VSCode handles this

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant