jupyterlab-lsp
jupyterlab-lsp copied to clipboard
Kernel-based autocomplete doesn't work for editors with an attached kernel
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
- Disable LSP autocomplete in Advanced Settings -> Code Completion
{"disableCompletionsFrom": ["LSP"]}
- Open a python file in the editor
- Right-click -> Create Console for Editor
- 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
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.
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 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.