jupyterlab-lsp icon indicating copy to clipboard operation
jupyterlab-lsp copied to clipboard

Kernel-based autocomplete doesn't work for editors with an attached kernel

Open sntgluca opened this issue 3 years ago • 3 comments

Description

Hi, following up with #586, I noticed that disabling LSP completion removes autocompletion in the editor even if a console is attached. Without the jupyter-lsp package, it's possible to attach a console to the editor to get kernel-base completion for it. Although it's not the best user experience, it gets the job done. I'd expect this feature to be maintained if

"disableCompletionsFrom": ["LSP"]

is used.

Reproduce

  1. Disable LSP autocomplete in Advanced Settings -> Code Completion
{"disableCompletionsFrom": ["LSP"]}
  1. Open a python file in the editor
  2. Right-click -> Create Console for Editor
  3. Type and try autocompleting any statement -> nothing happens.

Expected behavior

I'd expect autocomplete to work for editors with a kernel attached.

Version

Tested on JupyterLab 3.0.18 and juptyer-lsp 3.7

sntgluca avatar Jun 17 '21 09:06 sntgluca

I have also run into this issue. Just for clarity "disableCompletionsFrom": ["LSP"] is not the cause of the issue but just makes the symptoms more obvious. With "disableCompletionsFrom": [] I still run into this issue if I attach a console to an external kernel that contains libraries not installed in the jupyterlab environment.

timothymillar avatar Jun 27 '21 23:06 timothymillar

Has anyone found a solution for this? I find kernel based completions very useful in my exploratory notebooks. Ideally I would like to combine both the LSP completions and the kernel completions.

flaport avatar Dec 09 '21 18:12 flaport

@flaport it should work fine for notebooks. This issue is about enabling this for text files ("editors"). If it does not work for you please fill in a bug report template.

krassowski avatar Dec 09 '21 18:12 krassowski