Subject: Re: bug#59214: [PATCH] Alternate rust-analyzer command added

From: João Távora <[email-masked]>
Date: Wed, 16 Nov 2022 17:14:11 +0000

On Wed, Nov 16, 2022, 17:05 Eli Zaretskii <[email-masked]> wrote:

> > From: Pankaj Jangid <[email-masked]>
> > Date: Sat, 12 Nov 2022 17:23:19 +0530
> >
> > * lisp/progmodes/eglot.el (eglot-server-programs): There are two
> > ways to run rust-analyzer. After adding the rustup component,
> > users can add rust-analyzer to path and run rust-analyzer directly
> > or they may run ``rustup run stable rust-analyzer'' command. This
> > revision adds the 2nd command to the list of server programs.
> > ---
> >  lisp/progmodes/eglot.el | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> > index 63ebbe6cab..f54c2d2c3a 100644
> > --- a/lisp/progmodes/eglot.el
> > +++ b/lisp/progmodes/eglot.el
> > @@ -181,7 +181,7 @@ eglot-alternatives
> >                        when probe return (cons probe args)
> >                        finally (funcall err)))))))
> >
> > -(defvar eglot-server-programs `((rust-mode . ,(eglot-alternatives
> '("rust-analyzer" "rls")))
> > +(defvar eglot-server-programs `((rust-mode . ,(eglot-alternatives
> '("rust-analyzer" ("rustup" "run" "stable" "rust-analyzer") "rls")))
> >                                  (cmake-mode . ("cmake-language-server"))
> >                                  (vimrc-mode . ("vim-language-server"
> "--stdio"))
> >                                  (python-mode
> > --
> > 2.30.2
>
> João, what is the procedure for handling the submissions such as this
> one?  Should we ping you and wait for your decision, or are you okay
> with installing such additions based on our own judgment?
>

Additions  of servers in eglot-server-programs can be installed freely
according to your judgement. Deletions and replacements based on reports of
stale/unmaintained/deprecated servers as well, but feel free to ping me.

Here, we would need and rust expert to explain why the the middle entry is
different or more useful than the first one. I'm not that expert, but
Pankaj's rationale looks reasonably sane. So maybe delete the simple
"rust-analyzer" one? Or maybe not. But two entries for the same server
looks odd. As i said, this must be looked at by someone with knowledge of
rust toolchain and configuration idioms.

João