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

Document completion menu bindings #10994

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions book/src/keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,12 @@ Displays documentation for item under cursor. Remapping currently not supported.

Displays documentation for the selected completion item. Remapping currently not supported.

| Key | Description |
| ---- | ----------- |
| `Shift-Tab`, `Ctrl-p`, `Up` | Previous entry |
| `Tab`, `Ctrl-n`, `Down` | Next entry |
| Key | Description |
| ---- | ----------- |
| `Shift-Tab`, `Ctrl-p`, `Up` | Previous entry |
| `Tab`, `Ctrl-n`, `Down` | Next entry |
| `Escape` | Close menu and accept completion |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior is a little nuanced for escape - it's not directly handled by completion. It's actually ignored by completion and anything ignored by completion (arrow keys for example) cause the completion to be accepted. We may want to remove this from the table here and then have a blurb below that says that anything other than what's in the table causes the completion item to be accepted.

| `Ctrl-c` | Close menu and reject completion |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only other one that's special cased I believe is Enter which just accepts the completion item


##### Signature-help Popup

Expand Down
Loading