Subject: bug#78492: [PATCH] 31.0.50; eglot.el does not support pyrefly LSP server (python)

From: Ship Mints <[email-masked]>
Date: Mon, 19 May 2025 06:37:28 -0400

On Mon, May 19, 2025 at 4:06 AM Jostein Kjønigsen <
[email-masked]> wrote:

> Hey everyone.
>
> There's a new, fast combined type-checker and LSP-server available for
> Python called "pyrefly". The source can be found here:
> https://github.com/facebook/pyrefly
>
> Currently it's not possible to use this LSP-server with eglot, due to
> missing configuration.
>
> Attached is a patch which fixes this.
>

Cool.  You jumped on pyrefly fast.  As eglot supports only one LSP server
at a time per session (for now...I think Joao has a multiplexer idea), it
might also be good to see pyrefly integrated into pylsp as mypy is (see
https://github.com/python-lsp/pylsp-mypy).  This way, eglot users can
benefit from simultaneous linting, type checking, and code navigation vs.
just type checking alone which is what they'd get using pyrefly as an LSP.
To be clear, I'm not saying skip the patch, I'm saying let's also encourage
integration under a multiplexing LSP.