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

Not getting the LSP features on the new jupyterlab with xeus python kernel #624

Closed
diogomrks opened this issue Jun 13, 2021 · 11 comments
Closed

Comments

@diogomrks
Copy link

Description

Not getting the LSP features on the new jupyterlab with xeus python kernel

Reproduce

Not sure how I could reproduce this but similar to the issue

I've got the newest jupyterlab and installed the python xeus kernel but am not getting any of the very useful LSP features

So i tried to install the extension separately but it doesn't seem to work, like you previously suggested with the git issue I ran

jupyter server extension list
jupyter server extension enable --py jupyterlab_lsp
jupyter server extension enable --sys-prefix --py jupyterlab_lsp
jupyter server extension enable --user --py jupyterlab_lsp

and it can't find the extension

I can see the options in the advanced setting options tho

Thanks in advance if anyone is able to take a look at this!

@krassowski
Copy link
Member

jupyter server extension enable --user --py jupyter_lsp

@krassowski
Copy link
Member

If that is not enough please provide all the details from the bug report template otherwise I would be just guessing.

@diogomrks
Copy link
Author

diogomrks commented Jun 13, 2021

image

Thanks for the quick response on SO I did what you said and it was the underscore, the command worked but I get the above error now
jlab log in case that's useful

image

I had a read through the template not sure what else I could include other than the screenshot, happy to provide any other info

@krassowski
Copy link
Member

jupyter labextension list would be a good start. Also pip list (or conda whatever you use).

@diogomrks
Copy link
Author

jupyter labextension list
image

pip3 list (not using conda)

Package Version Location


anyio 2.2.0
appdirs 1.4.4
argon2-cffi 20.1.0
astroid 2.5.6
async-generator 1.10
attrs 19.1.0
autopep8 1.5.7
Babel 2.9.1
backcall 0.2.0
bleach 3.1.0
cdsw 1.0.0
cffi 1.14.5
cfgv 3.2.0
Click 7.0
colorama 0.4.4
contextvars 2.4
coverage 4.5.4
cycler 0.10.0
Cython 0.25.2
dataclasses 0.8
de-utils 0.0.1 /home/cdsw
debugpy 1.3.0
decorator 4.4.0
defusedxml 0.6.0
distlib 0.3.1
entrypoints 0.3
filelock 3.0.12
flake8 3.9.2
Flask 0.12
futures 2.1.4
gitdb 4.0.7
GitPython 3.1.17
identify 2.2.4
idna 3.1
immutables 0.15
importlib-metadata 4.0.1
importlib-resources 5.1.3
ipykernel 5.1.1
ipython 7.16.1
ipython-genutils 0.2.0
ipywidgets 7.4.2
isort 5.8.0
itsdangerous 1.1.0
jedi 0.17.2
Jinja2 2.10.1
json5 0.9.5
jsonschema 3.0.1
jupyter 1.0.0
jupyter-client 6.2.0
jupyter-console 6.0.0
jupyter-core 4.7.1
jupyter-lsp 1.3.0
jupyter-server 1.7.0
jupyter-server-mathjax 0.2.2
jupyterlab 3.0.16
jupyterlab-git 0.30.1
jupyterlab-lsp 3.7.0
jupyterlab-server 2.5.1
kudu-python 1.2.0
lazy-object-proxy 1.6.0
MarkupSafe 1.1.1
matplotlib 2.0.0
mccabe 0.6.1
mistune 0.8.4
more-itertools 8.7.0
nbclassic 0.2.8
nbconvert 5.5.0
nbdime 3.0.0
nbformat 4.4.0
nest-asyncio 1.5.1
nodeenv 1.6.0
notebook 5.7.8
numpy 1.13.3
packaging 20.9
pandas 0.20.1
pandas-datareader 0.2.1
pandocfilters 1.4.2
parso 0.7.1
pexpect 4.7.0
pickleshare 0.7.5
pip 19.1.1
pluggy 0.13.1
pre-commit 2.12.1
prometheus-client 0.7.1
prompt-toolkit 3.0.18
ptyprocess 0.6.0
py 1.10.0
py4j 0.10.7
pycodestyle 2.7.0
pycparser 2.20
pydocstyle 6.0.0
pyflakes 2.3.1
Pygments 2.4.2
pylint 2.8.3
pyparsing 2.4.0
pyrsistent 0.15.2
pytest 5.4.3
python-dateutil 2.8.0
python-lsp-jsonrpc 1.0.0
python-lsp-server 1.0.1
pytz 2019.1
PyYAML 5.4.1
pyzmq 18.0.2
qtconsole 4.5.1
requests 2.13.0
requests-file 1.4.3
rope 0.19.0
scipy 1.3.0
seaborn 0.8
Send2Trash 1.5.0
setuptools 41.0.1
simplegeneric 0.8.1
simplejson 3.10.0
six 1.12.0
smmap 4.0.0
sniffio 1.2.0
snowballstemmer 2.1.0
terminado 0.9.5
testpath 0.4.2
toml 0.10.2
tornado 6.1
traitlets 4.3.2
typed-ast 1.4.3
typing-extensions 3.10.0.0
ujson 4.0.2
virtualenv 20.4.6
wcwidth 0.1.7
webencodings 0.5.1
websocket-client 0.59.0
Werkzeug 0.15.4
wheel 0.33.4
widgetsnbextension 3.4.2
wrapt 1.12.1
xeus-python 0.9.1
yapf 0.31.0
zipp 3.4.1

@diogomrks
Copy link
Author

image

Loosing track of screenshots but this one has a bit more info on the failed validation

@krassowski
Copy link
Member

You are trying to enable it system-wide using non-root user. Are you sure that you want to do this? Please note that the command I recommended uses --user rather than --sys-prefix:

jupyter server extension enable --user --py jupyter_lsp

Otherwise it would be looking good. If your configuration got messy you may want to uninstall jupyter-lsp and install it again clean.

@diogomrks
Copy link
Author

diogomrks commented Jun 13, 2021

It's worked! the tab auto completion is very slow like 5-8 second delay but it works (I did %config Completer.use_jedi = False as suggested) but in the example below I hadn't even started a kernel

while I moved on to writing df.aggregat the signature suggestion for DataFrame() came up I left it a few seconds and then the aggregate suggestion came up
image

It also happened that I hovered over import sys after hovering over import os and it kept showing the os lib info on hover

Is there way I can disable some of the functionality? I would really like to keep the auto-completion and flake8, pydocstyle and wouldn't mind switching off the rest if it meant these would work properly

I uninstalled 'python-lsp-server[all]' and installed jedi-language-server, this made the auto-completion instant/useful but obviously I lost the flake8, pydocstyle highlighting

Any advice? is there a way to disable somethings or instead only install jedi language server and pyflakes, pydocstyles & flake8 :)

For context, I'm putting guidance together on how other in my organisation of 3k+ people can use jlab for proper development, so I am acting as the guinea pig for getting all this stuff working on our awkward setup

@diogomrks
Copy link
Author

I see that I can disable some things in the language server advanced settings but unfortunately these I want to keep on

@krassowski
Copy link
Member

Glad it worked.

while I moved on to writing df.aggregat the signature suggestion for DataFrame() came up I left it a few seconds and then the aggregate suggestion came up

This is tracked in https://github.com/krassowski/jupyterlab-lsp/issues/619

Is there way I can disable some of the functionality? I would really like to keep the auto-completion and flake8, pydocstyle and wouldn't mind switching off the rest if it meant these would work properly

This is all planned but I unlikely to happen before mid July or more realistically August.

Any advice? is there a way to disable somethings or instead only install jedi language server and pyflakes, pydocstyles & flake8 :)

If performance wise jedi-language-server seems better for you then I would go for it. I am currently using my own fork of pyls which is faster; hopefully will be able to merge the changes upstream some time. There is also pyright which is somewhat between pyls and jedi-ls in performance and features (but requires a Node.js to be installed).

@krassowski
Copy link
Member

I will close this issue now as it seems the reported problem was resolved. Please feel welcome to open a new issue if you have improvement ideas or something else is not working as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants