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

Arrow Key does not work with intellicode (e.g. Copilot) autocompletion #3082

Open
1 of 2 tasks
samaursa opened this issue Nov 22, 2023 · 3 comments
Open
1 of 2 tasks

Comments

@samaursa
Copy link

samaursa commented Nov 22, 2023

Describe the bug
When vsvim is active, and intellicode/copilot is asked to only accept completion when pressing the right-arrow, the key press is consumed by vsvim.

To Reproduce

  • Make sure vsvim is enabled
  • Type some code where copilot/intellicode kicks in with their faded-text-preview
  • Press right-arrow, nothing will happen
  • Disable vsvim
  • Press right-arrow, copilot/intellicode should accept the completion

Expected behavior

  • Pressing right-arrow is not consumed by vsvim (unless there is a vsvimrc file with an override, in my case I tried with an empty vsvimrc)

  • Visual Studio version: 2022

  • VsVim version: 2.10.0.6

  • Programming Language: C++

  • Check(Type 'x') any that are installed:

    • ReSharper
    • Visual Assist

Additional context
I use Resharper, but I only have to disable vsvim for this behavior to correct itself.

Here's the output from vsvim debug output where vsvim consumes the input

VsVim VsCommandTarget::Exec UserInput Key.Right: 1496a755-94de-11d0-8c3f-00c04fc2aae2 9
VsVim VimBuffer.Process: none:Right:None
VsVim TryCustomProcess MoveCaretWithArrow Right and completion False
VsVim Complete Linked Undo Transaction: Insert after motion
VsVim Open Linked Undo Transaction: Insert after motion
VsVim VimBufferCoordinator::PreviewKeyUp Right
VsVim VimKeyProcessor::KeyUp Right None
VsVim VimKeyProcessor::KeyUp Handled = False
VsVim VimBufferCoordinator::KeyUp Right
@samaursa
Copy link
Author

samaursa commented Dec 9, 2023

Please see duplicate issue for more detailed repro steps if need be: #3084

@ericmutta
Copy link

@samaursa I was facing this same problem. One workaround is to untick the Apply whole line completions on right arrow:

image

...once you do that you can now simply use the Tab key to accept Copilot suggestions 👍

@samaursa
Copy link
Author

@ericmutta thanks for the suggestion. I checked that deliberately because I am using Resharper and with that option unchecked, Copilot and Resharper both fight for tab

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

2 participants