Next: Design rationale, Up: Multi-server support [Contents][Index]
Rassumfrassum is an
LSP server multiplexer program that fits the bill. Like most language
servers, it must be installed separately since it is not bundled with
Emacs (at time of writing). The installation is similar to installing
any other language server, and usually amounts to making sure the
program executable is somewhere in PATH or exec-path.
The Rassumfrassum program, invoked via the rass command, works
by spawning multiple LSP server subprocesses and aggregating their
capabilities, requests, and responses into a single unified LSP
interface. From Eglot’s perspective, it appears to be communicating with
a single server.
To use Rassumfrassum with Eglot, you can start it interactively with a
prefix argument to eglot and specify the rass command
followed by the actual servers you want to use, separated by --:
C-u M-x eglot RET rass -- clangd -- codebook-lsp serve RET
This starts clangd for C++ language support and
codebook-lsp for spell-checking in the same buffer.
For Python, you might use:
C-u M-x eglot RET rass -- ty server -- ruff server RET
or simply C-u M-x eglot RET rass python, using the “preset”
feature. This combines ty for type checking with
ruff for linting and formatting.
These configurations can be integrated into the
eglot-server-programs variable (see Setting Up LSP Servers)
for automatic use:
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(c-ts-base-mode . ("rass" "--" "clangd" "--"
"codebook-lsp" "serve")))
(add-to-list 'eglot-server-programs
'(python-mode . ("rass" "--" "ty" "server" "--"
"ruff" "server"))))
Next: Design rationale, Up: Multi-server support [Contents][Index]