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

Auto-complete issue related to file paths #241

Closed
ProblemFactory opened this issue Apr 9, 2020 · 4 comments · Fixed by #301
Closed

Auto-complete issue related to file paths #241

ProblemFactory opened this issue Apr 9, 2020 · 4 comments · Fixed by #301
Labels
bug Something isn't working

Comments

@ProblemFactory
Copy link

Description

When using jupyterlab-lsp, the file path autocomplete in str stops working. Also, sometimes it will automatically add useless .ipynb_checkpoints.

Reproduce

Issue 1:

  1. type '/' (including quote) in any notebook's code cell
  2. then press TAB after /.
  3. Nothing happens.

Issue 2:

  1. Go to any cell, type in the following code:
from scipy.io import loadmat
data = loadmat('/path/to/some/.mat/file')[0]
  1. type . after [0]
  2. ipynb_checkpoints will be appended after . symbol.

Expected behavior

Issue 1:
A list of files/folders should pop out for selection.

Issue 2:
Nothing should happen or a valid completion.

Context

  • Operating System and version: Windows 10 Pro x64 Version 1909
  • Browser and version: Chrome 80.0.3987.149
  • JupyterLab version: 2.0.1
  • jupyter-lsp version: 0.8.0
  • @krassowski/jupyterlab-lsp version: 1.0.0
@krassowski krassowski added bug Something isn't working help wanted Extra attention is needed labels Apr 10, 2020
@antonwnk
Copy link

I second both these. While the first one didn't strike me as an issue necessarily (don't know whether I should expect some path completion to begin or not), the second issue is very annoying.
It happens when I type . on an empty line and whenever I put square brackets for indexing.
I.e.

[].   # no completion
existing_or_undefined_variable[].  # completes with .ipynb_checkpoints/
existing_or_undefined_variable[.]  # completes with .ipynb_checkpoints/ even if dot is typed inside

@krassowski
Copy link
Member

Thank you @ProblemFactory for reporting and thanks @antonwnk for providing additional examples - it was useful for creating a test case!

I started working on that, and most of the annoying behaviour should be gone in the next release; most likely ETA in two weeks time.

@antonwnk
Copy link

Seems you have it covered! Thanks a lot.

@krassowski
Copy link
Member

This has been fixed upstream in JupyterLab. If there will be JupyterLab 2.2 release, it will likely be included in it. Otherwise it will be in JupyterLab 3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants