You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain
Bug description
When using clojure-lsp in a Tramp remote buffer, I'm observing the following behavior:
The LSP server successfully starts and connects on the remote host
Project diagnostics are correctly displayed in the modeline
Code actions like "Move to let" work as expected
Navigation functions like lsp-find-definition and lsp-describe-thing-at-point all fail to work, reporting that the symbol cannot be found, or displaying an empty help buffer
I've tested this on the sshx tramp method, and a custom wsl method.
Steps to reproduce
Navigate to a remote Clojure file using Tramp, e.g. with the Tramp path /sshx:localhost:proj/foo.clj
M-x lsp
Once the server has started, observe that lsp-find-references and other functions don't work
Expected behavior
The LSP client should work seamlessly over Tramp.
Which Language Server did you use?
clojure-lsp
OS
Windows
Error callstack
Anything else?
It's worth noting that clojure-lsp works well with Eglot over Tramp.
The text was updated successfully, but these errors were encountered:
@jkxyz I believe this is a clojure-lsp issue as I never dedicated time to make it remote filesystem aware, it's pretty coupled with local files unfortunatelly
I don't know if it's a clojure-lsp issue, since all these features do work fine when using Eglot as the LSP client. And I doubt that Eglot has any special handling for clojure-lsp or any LSP server in particular. I think that in some cases lsp-mode is failing to translate between the remote and local paths that are being sent to and received from the server. The LSP server still runs on the remote host and treats the files as local, so it shouldn't be expected to change anything there.
If the Emacs buffer has a path like /sshx:josh@123.456.789.123:Code/proj/foo.clj, then lsp-mode needs to know that the project root has an absolute path like /sshx:josh@123.456.789.123:/home/josh/Code/proj, and initialize clojure-lsp on the remote host using the local path for the root, /home/josh/Code/proj, and then also translate project file paths to local paths relative to the root I guess, so foo.clj. I think that probably this translation is failing somewhere.
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
When using
clojure-lsp
in a Tramp remote buffer, I'm observing the following behavior:lsp-find-definition
andlsp-describe-thing-at-point
all fail to work, reporting that the symbol cannot be found, or displaying an empty help bufferI've tested this on the
sshx
tramp method, and a customwsl
method.Steps to reproduce
/sshx:localhost:proj/foo.clj
M-x lsp
lsp-find-references
and other functions don't workExpected behavior
The LSP client should work seamlessly over Tramp.
Which Language Server did you use?
clojure-lsp
OS
Windows
Error callstack
Anything else?
It's worth noting that
clojure-lsp
works well with Eglot over Tramp.The text was updated successfully, but these errors were encountered: