Replies: 1 comment 1 reply
-
Hello @jimporter , you have a pull quest for this, right? Can you link it here? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Note: I'm filing this as a discussion since I have a patch for this, but
I'm awaiting copyright assignment paperwork (I requested it 2 weeks ago, though I'm not sure how long the process normally takes)(update: got the paperwork and just need to send it back) and don't want to hold things up on that if you'd prefer to fix this more quickly. Just let me know and I can either file a proper issue or submit a PR.When editing a file over Tramp from a Windows client (using
clangd
), callingxref-find-definitions
fails to find definitions in external files (e.g. system headers). It tries to open/sshx:server:path/to/header.h
(note the lack of a/
beforepath
). This is becauseeglot--uri-to-path
strips the leading/
while converting the URI. As I understand it, this is to help convertfile:///c:/path/to/file.txt
toc:/path/to/file.txt
.That's fine for Windows paths, but not POSIX paths; unfortunately,
eglot--uri-to-path
and its inverse only check if the client is Windows, so if you're using Tramp, it strips the leading/
erroneously. This actually manages to work for paths within the project, since eglot setsrootUri
tofile:////path/to/file
(note that there are 4 slashes). You can see this in the event log:I fixed this locally by only adding/removing the extra
/
on local paths on Windows clients.Also note that
rootPath
has a drive letter, even though it's actually a remote path on a Linux server. That's a separate issue caused by callingexpand-file-name
afterfile-local-name
ineglot--connect
; I think it should be the other way around. I'm not sure if this breaks anything though. At least, I didn't notice any issues...Like I said, I have a patch for all this, but I didn't want to make things more complicated for you by forcing you to wait until my copyright assignment paperwork is done. If you want me to file a PR though, just let me know.
Beta Was this translation helpful? Give feedback.
All reactions