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
Install a language server in a non-standard path (e.g. rust-analyzer, which installs in a subdirectory under $HOME and not /usr/bin)
Make sure that the server is in the path for a shell other than sh (e.g. set the path in .zprofile for zsh).
On the local machine:
Open a file remotely through TRAMP
Set shell-file-name to the shell you're using on the remote (e.g. (setq shell-file-name "zsh"))
M-x eglot.
Expected result:
Eglot should start
Actual result:
Eglot asks Enter program to execute (or <host>:<port>):, then when I type rust-analyzer it fails with message [jsonrpc] Server exited with status 127. Looking at eglot-events-buffer, it is clear that eglot tried to use sh to start the server.
Partial fix
The server starts correctly if I change function eglot--cmd to use (or shell-file-name "sh") instead of plain "sh", e.g.:
(defuneglot--cmd (contact)
"Helper for `eglot--connect'."
(if (file-remote-p default-directory)
;; TODO: this seems like a bug, although it’s everywhere. For;; some reason, for remote connections only, over a pipe, we;; need to turn off line buffering on the tty.;;;; Not only does this seem like there should be a better way,;; but it almost certainly doesn’t work on non-unix systems.
(list (or shell-file-name "sh") "-c"
(string-join (cons"stty raw > /dev/null;"
(mapcar#'shell-quote-argument contact))
""))
contact))
It still fails to autodetect the server and asks for the program to execute though.
The text was updated successfully, but these errors were encountered:
Please report this to the Emacs bug tracker with M-x report-emacs-bug and put Michael Albinus and me in CC: or X-Debbugs-CC:. I have very little TRAMP experience.
Please report this to the Emacs bug tracker with M-x report-emacs-bug and put Michael Albinus and me in CC: or X-Debbugs-CC:. I have very little TRAMP experience.
Steps to reproduce:
rust-analyzer
, which installs in a subdirectory under$HOME
and not/usr/bin
)sh
(e.g. set the path in.zprofile
forzsh
).shell-file-name
to the shell you're using on the remote (e.g.(setq shell-file-name "zsh")
)eglot
.Expected result:
Eglot should start
Actual result:
Eglot asks
Enter program to execute (or <host>:<port>):
, then when I typerust-analyzer
it fails with message[jsonrpc] Server exited with status 127
. Looking ateglot-events-buffer
, it is clear that eglot tried to usesh
to start the server.Partial fix
The server starts correctly if I change function
eglot--cmd
to use(or shell-file-name "sh")
instead of plain"sh"
, e.g.:It still fails to autodetect the server and asks for the program to execute though.
The text was updated successfully, but these errors were encountered: