emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-mode fontification feels random


From: Ergus
Subject: Re: cc-mode fontification feels random
Date: Sat, 5 Jun 2021 11:46:39 +0200

On Sat, Jun 05, 2021 at 09:41:15AM +0300, Eli Zaretskii wrote:

I see, thanks.

So is Emacs the only editor using LSP with remote files?  If other
editors support that, how do they solve this problem without incurring
delays?

I work with servers all the time and I have tried all kind of tools for
remote editing.

 So far the only other editor for remote files supporting completions
that just works and I am aware of; it is Visual Studio [code]
family. And actually, they use LSP protocol for that (completion and
indentation).

If I understand more or less how it works in VS it seems like the LSP
server runs locally (because it does not require any remote
modification/installation or so).

They do a kind of local mirror for completion (probably something
similar to sshfs to access all the unmodified files "on demand" and get
the best possible information) and they store a cache of the project in
the local filesystem to avoid recompiling everything the next time they
use the project..

Of course, there are some problems when the remote environment is not
available locally (missing modules, compilers, libraries). But in
general it is easier to install/modify locally than remotely (in our
tramp approach + lsp-mode or eglot; if clangd is not installed in the
remote server the user have nothing at all... and installing clangd in
every single remote system we use is not an option due to time,
permissions or resources.).

It seems that there are some heuristics there too, to reduce errors
exposes to the user and do the best possible, but in general it works
pretty well, specially for C/C++, jacascript, nodejs, and python.

Moreover, in my own usage of Eglot, I find it very convenient that it
runs the LSP server remotely. I often find myself files remotely over
TRAMP from a local machine with a minimal set of devtools. While I
could install all the LSP servers I need on all the machines I connect
from, it's less effort to rely on the fact that the machine that'll be
doing the compilation has all the devtools I need.

That sounds like a use case for running Emacs on the remote machine,
and only having the display on the local machine, like via X
forwarding or similar technology?

Some time ago, one of my first questions in this mailing list was how to
run emacsserver on a remote machine and connect to that with the local
emacsclient. On that moment that was not supported.

The approach any way has some practical issues.
1) We can't always open ports in the remote server; so we need at the
end to do a proxy throw ssh.

2) Many remote servers (for example login nodes in HPC servers) kill
the running processes if the user disconnects or if the process is in
the background.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]