9

In Jupyterlab, there is a text editor that we can open .py files, is it possible to also turn on tab completion, just like how it works in Notebook ?

Xingdong
  • 1,305
  • 2
  • 13
  • 18

3 Answers3

7

By now, tab completion in the text editor of jupyter lab has been implemented in this pull request (see also discussion in this issue). However, for it to be working you need to open a console for the editor (right click in the editor window and select Create Console for Editor).

astoeriko
  • 730
  • 8
  • 20
1

No, it is currently an open issue. https://github.com/jupyterlab/jupyterlab/issues/1276

DharmaTurtle
  • 6,858
  • 6
  • 38
  • 52
1

The package jupyterlab-lsp now provides tab completion in the text editor. You need can install it from pip or conda, along with a language server for Python:

pip install jupyter-lsp
pip install jedi-language-server

I also needed to enable the server side extension:

jupyter server extension enable --user --py jupyter_lsp

And enabled @krassowski/jupyterlab-lsp and @krassowski/completion-theme via JupyterLab's extension GUI (the puzzle piece on the right hand side). Then I restarted JupyterLab, and completion worked (with Tab). I am not sure if all these steps are neccessary, it might depend on your environment.

jdm
  • 9,470
  • 12
  • 58
  • 110