non-Jedi / eglot-jl

Wrapper for using Julia LanguageServer.jl with emacs eglot
Creative Commons Zero v1.0 Universal
61 stars 11 forks source link

TRAMP support? #39

Open jagot opened 1 year ago

jagot commented 1 year ago

I'd be curious to try this out, but I wonder if it will work for my use-case; rather often I work over SSH, with Emacs running locally. I would typically have a project folder with {Project,Manifest}.toml and most often some packages checked out for development under ~/.julia/dev/ (on the remote host).

How can I get started? AFAIU eglot supports TRAMP: https://github.com/sailfishos-mirror/emacs/commit/2076d345655206254f6749cf710c150dfec313dd

jagot commented 1 year ago

I managed to get it working by cloning this repository on the remote machine, opening a file in the project using TRAMP and then running M-x eglot. I then had to provide the full paths (relative to the remote machine, i.e. without /ssh:host:) to 1 Julia, 2 the eglot-jl directory, 3 the elgot-jl.jl file, and 4 the directory of my project. I can probably avoid having to do so manually every time using .dir-locals.el (https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html), however eglot-jl.jl seems to be hardcoded to be in the same directory as eglot-jl.el: https://github.com/non-Jedi/eglot-jl/blob/2e04597223553a369dd5b6520b6365b41e6ea508/eglot-jl.el#L36 which of course resides on my local machine, and not on the remote host. This can maybe be changed in the future?