-
Notifications
You must be signed in to change notification settings - Fork 50
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
Lsp server doesn't respond when special characters in filename or path. #64
Comments
Good catch! The URI -> filename should definitely be improved, not really sure why it isn't going through the URI module to begin with. The normalization that nimlsp does is only to resolve |
I implemented some more proper handling of URIs in #66, could you try if this works, both on Windows, and with paths containing special characters? |
Test results.
Note:- In the cases it does work (it manages to start) i can get 1 or 2 completions before i move around a little and it crashes again. after restarting the server, it seems to work for 1-2 more completions before dying again on moving around a little in the source code buffer in emacs.it could be classified as buggy. not sure if its just a emacs thing ? |
I'm experiencing the same thing on macOS, e.g. in my
The actual path is:
and in my project's
|
Any ideas how this can be investigated further? As @arjunkathuria suggested, it could just be an emacs thing, but it's a real pain, requiring one to manually rename directories in |
Wild guess... since paths involve conversion to URIs, maybe the |
I have been debugging why nimlsp wont work for me on windows, while works perfectly fine on linux.
what i found was, it seems to be that special characters in path/filename don't play nice with nimlsp and it doesnt respond.
I did some tests, This can be reproduced in linux also:-
#
in your path / filename. it wont work.Steps to reproduce issue.
code/nim/cil/zol.nim
code/nim/c#il/xol.nim
what causes this
while in the process, i found that the lsp-mode in emacs sends the request to server something like this:
if you see here, the uri it sends is already encoded:-
(:uri "file:///d%3A/Code/nim/test_karax/kar.nim")
^ this again gets
normalized
by nimlsp upon receiving, which further escapes it.d%253A
.proposed solution
stop normalizing the received urls ?
i taked to the lsp-mode guys on gitter too, if they'd send non encoded uri's ?
they said they need to stick to the spec and can't exactly just up and change it because they also work with other lsp-servers.
The text was updated successfully, but these errors were encountered: