-
Notifications
You must be signed in to change notification settings - Fork 201
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
file path auto completion add \ in path string #373
Comments
Hey @troubadour-hell, thanks for reporting. I think this problem depends on the way JupyterLab-LSP processes paths that come from this server. @krassowski, thoughts about this? |
For background, these changes were introduced 3 months ago in #337 I do not understand why the slashes there are escaped; my first expectation would be that no escaping should be needed on the server level and if escaping is needed for display then it is the clients' responsibility. Can you elaborate on the reasoning? |
Here you can find the reasoning: palantir/python-language-server#762 (see the PR description). |
So the rationale is to prevent conflicts with snippet grammar which uses escapes. In that case it should be only escaped when |
Yep, I agree with that. Could you submit a PR for it? |
I might not have that much context about this issue and I don't know what kind of values can be provide through those completions but I would think that either: |
Right, that's what @krassowski suggested we should do to solve this problem. |
do I understand right that this issue is fixed in 1.10? I can reproduce it using helix editor. I previously reported this issue to them: helix-editor/helix#9575. I checked version this way:
|
Helix supports snippet so this fix does not apply to us. The LSP standard does not List
If you do actually use a regex in your snippets then you need to retroactively escape slashes when you generate the regex (or control that using somekind of flag) |
Hello!I use jupyterlab-lsp with python-lsp-server. When I try to type in a file path, the auto-completion adds an \ before the last /, and it can't suggest the contents in this directory.
I find this:
python-lsp-server/pylsp/plugins/jedi_completion.py
Line 234 in 59856af
When I Removed "\\" from this line, it worked well. I'm not sure why it do this...
The text was updated successfully, but these errors were encountered: