joaotavora / eglot

A client for Language Server Protocol servers
GNU General Public License v3.0
2.22k stars 203 forks source link

Fix #859: Force Eglot over Tramp to use a seperate channel #1020

Closed jeslie0 closed 1 year ago

jeslie0 commented 1 year ago

This fixes https://github.com/joaotavora/eglot/issues/859. Emacs hanging and giving reentrant issues was caused by Eglot sending information over the same SSH connection that Emacs uses. When lots of data is being sent to or from the remote language server, the connection gets sluggish. The solution is to disable ControlMaster for Eglot, which causes it to make a new connection.

The downside is that the user might be prompted for the remote password, since a new SSH connection is being spawned.

An improvement could be to make a custom variable so the user can select if they want Eglot to run on a separate connection. For some language servers, it might not be worth having a separate connection?

joaotavora commented 1 year ago

After much discussion in emacs bug#61350 we reached the conclusion that this is an effective workaround. Newer Tramp will have this fixed at the original, hopefulls. Anyway, the code is now in Eglot's upstream.