Closed zhongweiy closed 6 years ago
The design I have in mind for this is that the remote machine runs cquery server daemon, and a LSP middleware handles the communication between the local machine and the remote machine, such that the local machine thinks that cquery server daemon is running locally.
Such a tool could be generic and work for any lsp server.
Right now, lsp-mode
doesn't support running clients in remote buffers. They're using the more feature-rich spawn-process variant (for its stderr/stdin separation) instead of the more stripped-down function that calls Tramp file handlers.
LSP clients also can't be shared / forwarded by lsp-mode
, either, as all IO is done over a pipe.
I've been idly plucking away at getting Tramp support working with lsp-mode
proper. Can't find a clever solution for logging stderr into a separate buffer, though, so that'll probably be unavailable on any Tramp-driven setup.
Does lsp-mode TCP connection work?
(defun lsp--make-tcp-connection (name command command-fn host port stderr) (lambda (filter sentinel)
If not, @zhongweiy can you make an issue to https://github.com/emacs-lsp/lsp-mode ?
Sorry for late reply.
@MaskRay How can I check whether lsp-mode TCP connection work? @jaelsasser If Tramp-driven setup doesn't work, is there any alternative for a remote project?
There is a generic issue about lsp-mode https://github.com/emacs-lsp/lsp-mode/issues/197
cquery seems to work reasonably well, if you drop tramp-mode and use sshfsexec instead.
Hi,
The situation: Emacs is running on desktop machine A and the project Foo is at remote machine B. And B's OS could be different with A. And currently, the project Foo is accessed on A's emacs by tramp-mode. So with compile_command.json provided for project Foo, could emacs-cquery work? Or how can I get it work for such case?
What I have tried: I've got emacs-cquery worked on machine A if project Foo is also at machine A. And when I move project Foo to machine B and open it, I get following error:
File mode specification error: (error Process lsp-cquery<1> not running)
Thanks!