From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#59214: [PATCH] Alternate rust-analyzer command added Date: Wed, 16 Nov 2022 17:14:11 +0000 Message-ID: References: <87o7tc2xu8.fsf@codeisgreat.org> <83leoag78l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ac99f305ed999a32" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29535"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59214@debbugs.gnu.org, Pankaj Jangid To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 16 18:15:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovM0P-0007NY-EX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Nov 2022 18:15:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovM08-0001mt-ML; Wed, 16 Nov 2022 12:15:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovM07-0001jz-2x for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 12:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovM06-0001ET-Qi for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 12:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovM06-0008Tl-En for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 12:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Nov 2022 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59214-submit@debbugs.gnu.org id=B59214.166861887332542 (code B ref 59214); Wed, 16 Nov 2022 17:15:02 +0000 Original-Received: (at 59214) by debbugs.gnu.org; 16 Nov 2022 17:14:33 +0000 Original-Received: from localhost ([127.0.0.1]:58024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovLzc-0008Sl-FT for submit@debbugs.gnu.org; Wed, 16 Nov 2022 12:14:33 -0500 Original-Received: from mail-oi1-f178.google.com ([209.85.167.178]:42628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovLza-0008SW-7C for 59214@debbugs.gnu.org; Wed, 16 Nov 2022 12:14:31 -0500 Original-Received: by mail-oi1-f178.google.com with SMTP id q186so19198211oia.9 for <59214@debbugs.gnu.org>; Wed, 16 Nov 2022 09:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/RgbyeWSWsiYKCfuqFFemp3EB6KUAeCW153CUMsM6ho=; b=i9hu9BB8y29q+T3atwPfcSvMUv3mw8TpjN/8+13Kd/AdFVRjOfxHbHGAYeprxcmK8I BX65ySvmtWYxR5BJmzArLvUYlRWwxnd6uFXYhjajb/2LKUYOiP/EBe7Z2vVkDyy3NnLL v4Dh8JCuvfrkVVgxwGd+1zfCatvDvrziLTtfFjaqRVangTc2fqRVwKRT0lmaEIkZtrYa qDMBtDPPRL47llGwuRVsfhpwv11Do/t/davZ5ZzXHXCmMnfPQXfxh1QHwEds+ZrG9N/g HEHDjW+GcvXESkGx1bCKRx3W+sKR/vOfPF/qlrmFf47qJdreuWUrGadGz9e8Jr3hM12P tvbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/RgbyeWSWsiYKCfuqFFemp3EB6KUAeCW153CUMsM6ho=; b=J9eb7L9h6woJV84H6qC4qDOOSjx+dy7juSVo1nhPQ8oag2PdXNfuZ7n7Keh+udiePJ 4pQTthF+alMYPV3AFUpVxoZ9u2vm28FWZFupqqG3j7RPoejSLRSeEv7sdSta1qkyK5HX M9myQtKkJqmF6khyCOmAevSkK9HSQp2Ofc5DqwrkHq0lGEHLkzNmXUUAtoFchnTOn6OJ 3dfsvPsWQrYYyMUmxDGyK39aM5NTnJBBTwru/CqDZGDv4LNi1gQzAVxn5ec7cd4kDWU6 dO0l16jU23l8opjgZpcdhgs+PuS1/2LMDwv3dern/bc1CEjTQOep4E1zDkc6bmoybF84 Btwg== X-Gm-Message-State: ANoB5pkMO9sc5ntWO3SIs/RIgpKuTOzFrKcANFBFRgtgTpSmpS40+l45 P0auONoifJTEW/7b4HQYh018VzqYk378Hy9tDG4= X-Google-Smtp-Source: AA0mqf4hCGmSV+wljBxbnn2S63GDY2+N75tNtwS/tjd2yyIWaDr3AZVF61Mo4yqdrCl9WkKbdwdVYqGp/E+Jh/2mUtc= X-Received: by 2002:aca:170d:0:b0:35a:7e8d:8ad6 with SMTP id j13-20020aca170d000000b0035a7e8d8ad6mr2036910oii.171.1668618864333; Wed, 16 Nov 2022 09:14:24 -0800 (PST) In-Reply-To: <83leoag78l.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248029 Archived-At: --000000000000ac99f305ed999a32 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 16, 2022, 17:05 Eli Zaretskii wrote: > > From: Pankaj Jangid > > 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=C3=A3o, what is the procedure for handling the submissions such as thi= s > 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=C3=A3o > --000000000000ac99f305ed999a32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Nov 16, 2022, 17:05 Eli Zaretskii <eliz@gnu.org<= /a>> wrote:
> From: Pankaj Ja= ngid <pankaj@codeisgreat.org>
> 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. T= his
> revision adds the 2nd command to the list of server programs.
> ---
>=C2=A0 lisp/progmodes/eglot.el | 2 +-
>=C2=A0 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
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 when probe return (cons probe args)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 finally (funcall err)))))))
>=C2=A0
> -(defvar eglot-server-programs `((rust-mode . ,(eglot-alternatives = 9;("rust-analyzer" "rls")))
> +(defvar eglot-server-programs `((rust-mode . ,(eglot-alternatives = 9;("rust-analyzer" ("rustup" "run" "stab= le" "rust-analyzer") "rls")))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cmake-mode . ("cmake= -language-server"))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vimrc-mode . ("vim-l= anguage-server" "--stdio"))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (python-mode
> --
> 2.30.2

Jo=C3=A3o, what is the procedure for handling the submissions such as this<= br> one?=C2=A0 Should we ping you and wait for your decision, or are you okay with installing such additions based on our own judgment?
<= /div>

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

Here, we would need and rust expert to exp= lain why the the middle entry is different or more useful than the first on= e. I'm not that expert, but Pankaj's rationale looks reasonably san= e. 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 look= ed at by someone with knowledge of rust toolchain and configuration idioms.=

Jo=C3=A3o
--000000000000ac99f305ed999a32--