I am a new user who recently switched to JupyterLab. I’ve noticed that when I use autocomplete in JupyterLab running in the browser, the Language Server Protocol (LSP) defaults to using Enter as the shortcut key to accept a selected suggestion, while Tab and the up/down arrows can be used to scroll through the list of suggestions. This is contrary to my usage habits in other editors like VSCode, where pressing Tab always accepts the suggestion.
Can anyone help me understand why this is the case and how I might be able to change it?
LSP extension uses tab as the shortcut key to accept a selected suggestion.This matches my usage habits in VSCode only when there is just one candidate.(enumerate)
But when there are many candidates(abs ,all, any ,..), pressing tab only result in selecting the next candidate instead of accept “abs”.It is the Enter that would make it accepted.That’s odd.
what i did:
- Open JupyterLab and click on the
Settings
dropdown menu. - Select
Advanced Settings Editor
. - Select
Keyboard Shortcuts
.
I’ve searched through the entire Keyboard Shortcuts
, but I couldn’t find a command called ‘Accept a suggestion’, nor could I find an option to change its keybinding. Is there a way to make the behaviors in these two situations consistent?
Information:
Version:
$jupyter --version
Selected Jupyter core packages...
IPython : 8.24.0
ipykernel : 6.29.4
ipywidgets : not installed
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.0
jupyterlab : 4.2.1
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : not installed
qtconsole : not installed
traitlets : 5.14.3
$python -V
Python 3.11.9
Browser:
Microsoft Edge
Version 125.0.2535.67 (official version) (64 bit)
System:
Windows 10
Blackokko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.