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

Consider using a different default keybinding for lsp-inline-completion-accept in terminal or document it and recommend a different keybinding #4657

Open
3 tasks done
xuhdev opened this issue Dec 25, 2024 · 0 comments
Labels

Comments

@xuhdev
Copy link
Contributor

xuhdev commented Dec 25, 2024

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

Terminals translate Ctrl-Enter to Enter. Currently, lsp-inline-completion-accept by default is bound to Ctrl-Enter. This is confusing to a user unfamiliar with terminal key pitfalls: The user follows the instructions and hits Ctrl-Enter, but actually Emacs receives Enter, which lsp-inline-completion-mode translates to "Cancel", the exact opposite.

A more detailed explanation on keys in terminal emulators: https://unix.stackexchange.com/a/161725/38242

Steps to reproduce

Launch a terminal, try to accept a completion generated by lsp-inline-completion-mode with Ctrl-Enter.

Expected behavior

Either inform that they should use a different keybinding, or use a different default keybinding in terminal.

Which Language Server did you use?

N/A

OS

Linux

Error callstack

No response

Anything else?

Alternatively, we can bind both Ctrl-Enter and Alt-Enter to lsp-inline-completion-mode.

@xuhdev xuhdev added the bug label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant