Eglot: Connect to Multiple LSP Servers

In Eglot, multiple servers are acceptable alternatives for handling a given major-mode, but only one server takes effect. Other lsp clients like lsp-mode and lsp-bridge already support multiple LSP servers, other editors like VSCode, Neovim, Zed also support this feature.

rassumfrassum, developed by the author of Eglot, can work with Eglot to connect to multiple servers. Hopefully, Eglot may have built-in multiple LSP servers support.

The rass program, the main entry point, behaves like an LSP stdio server, so clients think they are talking to single LSP server, even though they are secretly talking to many. Behind the scenes more stdio LSP server subprocesses are spawned.

For Python development with ty and Ruff, run from the command line: rass -- ty server -- ruff server.

Add server associations to eglot-server-programs for Eglot:

(add-to-list 'eglot-server-programs
             '((python-mode python-ts-mode) . ("rass" "--" "ty" "server" "--" "ruff" "server")))

Related

Python Development in Emacs

A guide to setup python development environment in Emacs.

Integrate Harper With Emacs

Harper is a grammar checker designed to run anywhere there is text (so really, anywhere).

Clangd Configuration With Eglot

Eglot是Emacs内置的LSP客户端。Eglot内置已支持大量的LSP服务端。以C++语言为例,Eglot支持clangd和ccls两种服务端模式。