Skip to content

Unable to jump to files in the same folder than notebook #1127

@memeplex

Description

@memeplex

Description

Cannot jump to python files in the same folder than a notebook.

Reproduce

  1. Run jupyterlab with lsp server in an empty folder.
  2. Create a python file with a function.
  3. Create a notebook that imports the function.
  4. Autocomplete works fine, signature tooltip is shown for the function.
  5. Alt-click on it: no jump targets found.
  6. Just in case set "pylsp.plugins.jedi.extra_paths": ["."]
  7. The same.

Expected behavior

The language server is clearly aware of the function so there is not reason for it not to be able to jump to it.

Context

  • Operating System and version: macOS Sequoia 15.1
  • Browser and version: Chrome 137
  • JupyterLab version: 4.4.3
  • Language server and version: python-lsp-server 1.12.2
Required: installed server extensions
Config dir: /Users/carlos/.jupyter

Config dir: /private/tmp/testlab/env/etc/jupyter
jupyter_lsp enabled
- Validating jupyter_lsp...
jupyter_lsp 2.2.5 OK
jupyter_server_mathjax enabled
- Validating jupyter_server_mathjax...
jupyter_server_mathjax OK
jupyter_server_terminals enabled
- Validating jupyter_server_terminals...
jupyter_server_terminals 0.5.3 OK
jupyterlab enabled
- Validating jupyterlab...
jupyterlab 4.4.3 OK
jupyterlab_git enabled
- Validating jupyterlab_git...
jupyterlab_git 0.51.1 OK
nbdime enabled
- Validating nbdime...
nbdime 4.0.2 OK
notebook_shim enabled
- Validating notebook_shim...
notebook_shim OK

Config dir: /usr/local/etc/jupyter

Required: installed lab extensions
JupyterLab v4.4.3
/private/tmp/testlab/env/share/jupyter/labextensions
        jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
        nbdime-jupyterlab v3.0.2 enabled OK
        @jupyter-lsp/jupyterlab-lsp v5.1.1 enabled OK (python, jupyterlab-lsp)
        @jupyterlab/git v0.51.1 enabled OK (python, jupyterlab-git)

Disabled extensions:
@jupyterlab/completer-extension:base-service
@jupyterlab/fileeditor-extension:language-server
@jupyterlab/lsp-extension:settings
@jupyterlab/notebook-extension:language-server

Troubleshoot Output
$PATH:
	/private/tmp/testlab/env/bin
	/Users/carlos/Documents/Util
	/Users/carlos/.local/bin
	/Users/carlos/.venvs/base/bin
	/opt/homebrew/bin
	/opt/homebrew/sbin
	/usr/local/bin
	/System/Cryptexes/App/usr/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

sys.path:
/private/tmp/testlab/env/bin
/Users/carlos/Documents/Util
/opt/homebrew/Cellar/[email protected]/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python312.zip
/opt/homebrew/Cellar/[email protected]/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/opt/homebrew/Cellar/[email protected]/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload
/private/tmp/testlab/env/lib/python3.12/site-packages

sys.executable:
/private/tmp/testlab/env/bin/python3.12

sys.version:
3.12.9 (main, Feb 4 2025, 14:38:38) [Clang 16.0.0 (clang-1600.0.26.6)]

platform.platform():
macOS-15.1-arm64-arm-64bit

which -a jupyter:
/private/tmp/testlab/env/bin/jupyter
/Users/carlos/.venvs/base/bin/jupyter

pip list:
Package Version
------------------------- --------------
anyio 4.9.0
appnope 0.1.4
argon2-cffi 25.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
astroid 3.3.10
asttokens 3.0.0
async-lru 2.0.5
attrs 25.3.0
autopep8 2.0.4
babel 2.17.0
beautifulsoup4 4.13.4
bleach 6.2.0
certifi 2025.4.26
cffi 1.17.1
charset-normalizer 3.4.2
colorama 0.4.6
comm 0.2.2
debugpy 1.8.14
decorator 5.2.1
defusedxml 0.7.1
dill 0.4.0
docstring-to-markdown 0.17
executing 2.2.0
fastjsonschema 2.21.1
flake8 7.1.2
fqdn 1.5.1
gitdb 4.0.12
GitPython 3.1.44
h11 0.16.0
httpcore 1.0.9
httpx 0.28.1
idna 3.10
importlib_metadata 8.7.0
ipykernel 6.29.5
ipython 9.3.0
ipython_pygments_lexers 1.1.1
isoduration 20.11.0
isort 6.0.1
jedi 0.19.2
Jinja2 3.1.6
json5 0.12.0
jsonpointer 3.0.0
jsonschema 4.24.0
jsonschema-specifications 2025.4.1
jupyter_client 8.6.3
jupyter_core 5.8.1
jupyter-events 0.12.0
jupyter-lsp 2.2.5
jupyter_server 2.16.0
jupyter-server-mathjax 0.2.6
jupyter_server_terminals 0.5.3
jupyterlab 4.4.3
jupyterlab_git 0.51.1
jupyterlab-lsp 5.1.1
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.3
MarkupSafe 3.0.2
matplotlib-inline 0.1.7
mccabe 0.7.0
mistune 3.1.3
nbclient 0.10.2
nbconvert 7.16.6
nbdime 4.0.2
nbformat 5.10.4
nest-asyncio 1.6.0
notebook_shim 0.2.4
overrides 7.7.0
packaging 25.0
pandocfilters 1.5.1
parso 0.8.4
pexpect 4.9.0
pip 25.1.1
platformdirs 4.3.8
pluggy 1.6.0
prometheus_client 0.22.1
prompt_toolkit 3.0.51
psutil 7.0.0
ptyprocess 0.7.0
pure_eval 0.2.3
pycodestyle 2.12.1
pycparser 2.22
pydocstyle 6.3.0
pyflakes 3.2.0
Pygments 2.19.1
pylint 3.3.7
python-dateutil 2.9.0.post0
python-json-logger 3.3.0
python-lsp-jsonrpc 1.1.2
python-lsp-server 1.12.2
pytoolconfig 1.3.1
PyYAML 6.0.2
pyzmq 26.4.0
referencing 0.36.2
requests 2.32.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rope 1.13.0
rpds-py 0.25.1
Send2Trash 1.8.3
setuptools 80.9.0
six 1.17.0
smmap 5.0.2
sniffio 1.3.1
snowballstemmer 3.0.1
soupsieve 2.7
stack-data 0.6.3
terminado 0.18.1
tinycss2 1.4.0
tomlkit 0.13.3
tornado 6.5.1
traitlets 5.14.3
types-python-dateutil 2.9.0.20250516
typing_extensions 4.14.0
ujson 5.10.0
uri-template 1.3.0
urllib3 2.4.0
wcwidth 0.2.13
webcolors 24.11.1
webencodings 0.5.1
websocket-client 1.8.0
whatthepatch 1.0.7
yapf 0.43.0
zipp 3.22.0

Command Line Output
[I 2025-06-06 17:16:51.620 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2025-06-06 17:16:51.622 ServerApp] jupyter_server_mathjax | extension was successfully linked.
[I 2025-06-06 17:16:51.623 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2025-06-06 17:16:51.625 ServerApp] jupyterlab | extension was successfully linked.
[I 2025-06-06 17:16:51.625 ServerApp] jupyterlab_git | extension was successfully linked.
[I 2025-06-06 17:16:51.625 ServerApp] nbdime | extension was successfully linked.
[I 2025-06-06 17:16:51.825 ServerApp] notebook_shim | extension was successfully linked.
[I 2025-06-06 17:16:51.874 ServerApp] notebook_shim | extension was successfully loaded.
[I 2025-06-06 17:16:51.875 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2025-06-06 17:16:51.875 ServerApp] jupyter_server_mathjax | extension was successfully loaded.
[I 2025-06-06 17:16:51.875 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2025-06-06 17:16:51.877 LabApp] JupyterLab extension loaded from /private/tmp/testlab/env/lib/python3.12/site-packages/jupyterlab
[I 2025-06-06 17:16:51.877 LabApp] JupyterLab application directory is /private/tmp/testlab/env/share/jupyter/lab
[I 2025-06-06 17:16:51.877 LabApp] Extension Manager is 'pypi'.
[I 2025-06-06 17:16:51.900 ServerApp] jupyterlab | extension was successfully loaded.
[I 2025-06-06 17:16:51.902 ServerApp] jupyterlab_git | extension was successfully loaded.
[I 2025-06-06 17:16:51.948 ServerApp] nbdime | extension was successfully loaded.
[I 2025-06-06 17:16:51.949 ServerApp] Serving notebooks from local directory: /private/tmp/testlab
[I 2025-06-06 17:16:51.949 ServerApp] Jupyter Server 2.16.0 is running at:
[I 2025-06-06 17:16:51.949 ServerApp] http://localhost:8888/lab?token=2c0a1e7c4349f9da27cd1c7f63aee26badb78ce127b1ba32
[I 2025-06-06 17:16:51.949 ServerApp]     http://127.0.0.1:8888/lab?token=2c0a1e7c4349f9da27cd1c7f63aee26badb78ce127b1ba32
[I 2025-06-06 17:16:51.949 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2025-06-06 17:16:51.952 ServerApp] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions