cquery-project / emacs-cquery

Emacs client for cquery, a low-latency language server supporting multi-million line C++ code-bases
116 stars 14 forks source link

Does emacs-cquery work with remote project (with tramp)? #12

Closed zhongweiy closed 6 years ago

zhongweiy commented 6 years ago

Hi,

Thanks!

jacobdufault commented 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.

jaelsasser commented 6 years ago

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.

MaskRay commented 6 years ago

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 ?

zhongweiy commented 6 years ago

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?

MaskRay commented 6 years ago

There is a generic issue about lsp-mode https://github.com/emacs-lsp/lsp-mode/issues/197

mheiskan commented 6 years ago

cquery seems to work reasonably well, if you drop tramp-mode and use sshfsexec instead.