-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
could eglot work with remote project? #84
Comments
Hi, this is a very good question.
Yes, I suppose so. Although it depends on how the server interprets the resulting file URLs. Eglot could, if the spec allows it (or even if it doesn't) implement a customization point for this.
You can, assuming you have TCP/IP on the pi and start the server with this option. See the docstring of |
Thanks! I'll give a try. |
FWIW, I'd be ... quite in favor, shall we say, of this happening. For "local", as in stdio style, servers, switching to just using I'm glad to hear you are open to the idea, as depending how things go, I may end up with submittable patches; do you require confirmation of FSF contribution papers, or another agreement for them? Please do not take this as any sort of promise about when, or if, I will do anything, though. :/ |
This comment made me realize that this is better implemented in Emacs's jsonrpc.el, rather than in eglot.el (although it could be experimentally implemented in eglot).
I require that you start the copyright paperwork process, but you can contribute before you get the official confirmation. |
By following your suggestion, I took a try by providing a LSP remote server (a Cquery server) to Eglot and converting the tramp file URL to local file URL back and forth. And I check some functions ( I have not tried the approach @slippycheeze mentioned (start the Cquery server by Here are some details:
|
Also close joaotavora/eglot#463, close joaotavora/eglot#84. Thanks to Brian Cully for the original simple idea. The basic technique is to pass :file-handler t to make-process, then tweak eglot--uri-to-path and eglot--path-to-uri, along with some other functions, to be aware of "trampy" paths". Crucially, a "stty hack" was needed. It has been encapsulated in a new a new eglot--cmd helper, which contains a comment explaining the hack. Co-authored-by: João Távora <joaotavora@gmail.com> * eglot.el (eglot--executable-find): Shim two-arg executable-find function only available on Emacs 27. (eglot--guess-contact): Use eglot--executable-find. (eglot--cmd): New helper. (eglot--connect): Use eglot--cmd. Use :file-handler arg to make-process. (eglot--connect, eglot--path-to-uri): Be aware of trampy file names. * eglot-tests.el (eglot-tests--auto-detect-running-server-1): New helper. (eglot--guessing-contact): Better mock for executable-find. (eglot--tramp-test): New test. * NEWS.md: mention TRAMP support. * README.md: mention TRAMP support.
Also close joaotavora/eglot#463, close joaotavora/eglot#84. Thanks to Brian Cully for the original simple idea. The basic technique is to pass :file-handler t to make-process, then tweak eglot--uri-to-path and eglot--path-to-uri, along with some other functions, to be aware of "trampy" paths". Crucially, a "stty hack" was needed. It has been encapsulated in a new a new eglot--cmd helper, which contains a comment explaining the hack. Co-authored-by: João Távora <joaotavora@gmail.com> * eglot.el (eglot--executable-find): Shim two-arg executable-find function only available on Emacs 27. (eglot--guess-contact): Use eglot--executable-find. (eglot--cmd): New helper. (eglot--connect): Use eglot--cmd. Use :file-handler arg to make-process. (eglot--connect, eglot--path-to-uri): Be aware of trampy file names. * eglot-tests.el (eglot-tests--auto-detect-running-server-1): New helper. (eglot--guessing-contact): Better mock for executable-find. (eglot--tramp-test): New test. * NEWS.md: mention TRAMP support. * README.md: mention TRAMP support.
Also close #463, close #84. Thanks to Brian Cully for the original simple idea. The basic technique is to pass :file-handler t to make-process, then tweak eglot--uri-to-path and eglot--path-to-uri, along with some other functions, to be aware of "trampy" paths". Crucially, a "stty hack" was needed. It has been encapsulated in a new a new eglot--cmd helper, which contains a comment explaining the hack. Co-authored-by: João Távora <joaotavora@gmail.com> * eglot.el (eglot--executable-find): Shim two-arg executable-find function only available on Emacs 27. (eglot--guess-contact): Use eglot--executable-find. (eglot--cmd): New helper. (eglot--connect): Use eglot--cmd. Use :file-handler arg to make-process. (eglot--connect, eglot--path-to-uri): Be aware of trampy file names. * eglot-tests.el (eglot-tests--auto-detect-running-server-1): New helper. (eglot--guessing-contact): Better mock for executable-find. (eglot--tramp-test): New test. * NEWS.md: mention TRAMP support. * README.md: mention TRAMP support. #637: joaotavora/eglot#637 #463: joaotavora/eglot#463 #84: joaotavora/eglot#84
Also close joaotavora/eglot#463, close joaotavora/eglot#84. Thanks to Brian Cully for the original simple idea. The basic technique is to pass :file-handler t to make-process, then tweak eglot--uri-to-path and eglot--path-to-uri, along with some other functions, to be aware of "trampy" paths". Crucially, a "stty hack" was needed. It has been encapsulated in a new a new eglot--cmd helper, which contains a comment explaining the hack. Co-authored-by: João Távora <joaotavora@gmail.com> * eglot.el (eglot--executable-find): Shim two-arg executable-find function only available on Emacs 27. (eglot--guess-contact): Use eglot--executable-find. (eglot--cmd): New helper. (eglot--connect): Use eglot--cmd. Use :file-handler arg to make-process. (eglot--connect, eglot--path-to-uri): Be aware of trampy file names. * eglot-tests.el (eglot-tests--auto-detect-running-server-1): New helper. (eglot--guessing-contact): Better mock for executable-find. (eglot--tramp-test): New test. * NEWS.md: mention TRAMP support. * README.md: mention TRAMP support. GitHub-reference: close joaotavora/eglot#637
hi,
Say a project is on a remote raspberry pi, I have emacs installed on local desktop. When the project file is opened by the desktop emacs (say using tramp), can I get the open file indexed?
Specificly, the project is a cpp project, the toolchain is only availabe on the remote pi. So the lsp server is better running on the remote pi. Can I get it work by eglot?
Thanks!
The text was updated successfully, but these errors were encountered: