From unknown Mon Aug 18 02:31:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67442 <67442@debbugs.gnu.org> To: bug#67442 <67442@debbugs.gnu.org> Subject: Status: [PATCH] eglot: Add ruff-lsp as an alternative python server Reply-To: bug#67442 <67442@debbugs.gnu.org> Date: Mon, 18 Aug 2025 09:31:13 +0000 retitle 67442 [PATCH] eglot: Add ruff-lsp as an alternative python server reassign 67442 emacs submitter 67442 Niall Dooley severity 67442 normal tag 67442 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 03:17:37 2023 Received: (at submit) by debbugs.gnu.org; 25 Nov 2023 08:17:38 +0000 Received: from localhost ([127.0.0.1]:37720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6nr6-0007ax-7X for submit@debbugs.gnu.org; Sat, 25 Nov 2023 03:17:37 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6etM-0000KR-5E for submit@debbugs.gnu.org; Fri, 24 Nov 2023 17:43:20 -0500 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 1r6etC-0002mK-41 for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 17:43:10 -0500 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6etA-0001ZU-7E for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 17:43:09 -0500 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-586ae6edf77so1103144eaf.1 for ; Fri, 24 Nov 2023 14:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700865785; x=1701470585; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=CElzSYe0G4sCwYplZAZ6bl+jAReXaxmNq3ycv7zQxLk=; b=Lm+fq6WAOW4iwTAHEGFi4wgKyWOWry7UPp53wb4d3y9fC/s2FEot1im9P8c66CXIhR eCsaORpcqzgBwB+L66X1BpOgKdi+dwV+pB9+piMO3wRsr8t8zFL4tW7j0wjkUYC9wR1S ICnoFYLN/5dUpVTP0ZGBAyreb7cny0M+pMMac0fL+EARdjj05Chzh9AbznQHSONQxW8B U+ScgxbhzteQ7ilUkb1S5GY9BWSpHujZCIztFxFXuWig4ElAo8gJsCFLA6HgAnIClV4c b5oLWF/jlVvl144TqcHriQVDBIvqaijZk6cjMAc4R7wUO2jcd2lQxnX9YDrgzVR2pomu VauQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700865785; x=1701470585; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CElzSYe0G4sCwYplZAZ6bl+jAReXaxmNq3ycv7zQxLk=; b=fEYD5L2BlFarHv/GVa8IjO/0nsempdt5UM9qRu5xWs962irKfUOzhfpcUWT4C6h8TI AZIK+7U1nvC656oZn/0vfCbAJssuoQrz2enM1U2SPk/xklnC7UnEghYtUW7cSxZLYGtu MCTVPM3yqlETngTo52unifBEa9CIfTjhy8m6FaCWTQK1gaATlDwp9RspBhAYW6UKLMcR kSVJ86odga1fFgWK+txkE0/8iB3BKFzskG0NDZShDkNnUuZwJXOqE+7KwpdpU+LZjnLL pOm2mVbmWE5NDTOuY6ZGUvf5goiXlfczSSo4BWfVGygkEXEPklYI+P2kQ1OH3Yc1EtPh Sx1Q== X-Gm-Message-State: AOJu0YzD0IJo9uJTHPCGORKav7sVYZ/XI+6/vGWe2onaoncAt+Pb7ZGd 4tuTPWp6T8/Bu3i8NfjX6e0ywy49Ng47qHCAMG4fbWvYEOHVXA== X-Google-Smtp-Source: AGHT+IGY3sdeqD4TQuUAdAr7Rg+DV+WRyFL3J0r5iiqDYHk0CCqiNUgnpyuvetzoPvCqu8g594ndjdBYLrZfK+BXjLk= X-Received: by 2002:a05:6820:2292:b0:581:f2d8:3f9f with SMTP id ck18-20020a056820229200b00581f2d83f9fmr4268599oob.7.1700865784864; Fri, 24 Nov 2023 14:43:04 -0800 (PST) MIME-Version: 1.0 From: Niall Dooley Date: Fri, 24 Nov 2023 23:42:28 +0100 Message-ID: Subject: [PATCH] eglot: Add ruff-lsp as an alternative python server To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary="000000000000eb09bf060aedac37" Received-SPF: pass client-ip=2607:f8b0:4864:20::c2e; envelope-from=dooleyn@gmail.com; helo=mail-oo1-xc2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 25 Nov 2023 03:17:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000eb09bf060aedac37 Content-Type: text/plain; charset="UTF-8" ruff-lsp [1] is a Language Server Protocol implementation for Ruff [2, 3], an extremely fast Python linter and code formatter, written in Rust. It supports surfacing Ruff diagnostics and providing Code Actions to fix them, but is intended to be used alongside another Python LSP in order to support features like navigation and autocompletion. [1]: https://github.com/astral-sh/ruff-lsp [2]: https://github.com/astral-sh/ruff [3]: https://docs.astral.sh/ruff/ --- 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 48ea33c3ee1..d7d91bddb01 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -216,7 +216,7 @@ eglot-server-programs (vimrc-mode . ("vim-language-server" "--stdio")) ((python-mode python-ts-mode) . ,(eglot-alternatives - '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server"))) + '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server" "ruff-lsp"))) ((js-json-mode json-mode json-ts-mode) . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") ("vscode-json-languageserver" "--stdio") -- 2.30.2 --000000000000eb09bf060aedac37 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-eglot-Add-ruff-lsp-as-an-alternative-python-server.patch" Content-Disposition: attachment; filename="0001-eglot-Add-ruff-lsp-as-an-alternative-python-server.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lpd7jjhl0 RnJvbSBiMWNmYzJkOTgwYWRiM2Y5OTYzYWIyYzg2MDdmNGZhNzhlMzU2YTJkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOaWFsbCBEb29sZXkgPGRvb2xleW5AZ21haWwuY29tPgpEYXRl OiBGcmksIDI0IE5vdiAyMDIzIDE2OjIxOjM5ICswMTAwClN1YmplY3Q6IFtQQVRDSF0gZWdsb3Q6 IEFkZCBydWZmLWxzcCBhcyBhbiBhbHRlcm5hdGl2ZSBweXRob24gc2VydmVyCgpydWZmLWxzcCBb MV0gaXMgYSBMYW5ndWFnZSBTZXJ2ZXIgUHJvdG9jb2wgaW1wbGVtZW50YXRpb24gZm9yIFJ1ZmYg WzIsCjNdLCBhbiBleHRyZW1lbHkgZmFzdCBQeXRob24gbGludGVyIGFuZCBjb2RlIGZvcm1hdHRl ciwgd3JpdHRlbiBpbgpSdXN0LgoKSXQgc3VwcG9ydHMgc3VyZmFjaW5nIFJ1ZmYgZGlhZ25vc3Rp Y3MgYW5kIHByb3ZpZGluZyBDb2RlIEFjdGlvbnMgdG8KZml4IHRoZW0sIGJ1dCBpcyBpbnRlbmRl ZCB0byBiZSB1c2VkIGFsb25nc2lkZSBhbm90aGVyIFB5dGhvbiBMU1AgaW4Kb3JkZXIgdG8gc3Vw cG9ydCBmZWF0dXJlcyBsaWtlIG5hdmlnYXRpb24gYW5kIGF1dG9jb21wbGV0aW9uLgoKWzFdOiBo dHRwczovL2dpdGh1Yi5jb20vYXN0cmFsLXNoL3J1ZmYtbHNwClsyXTogaHR0cHM6Ly9naXRodWIu Y29tL2FzdHJhbC1zaC9ydWZmClszXTogaHR0cHM6Ly9kb2NzLmFzdHJhbC5zaC9ydWZmLwotLS0K IGxpc3AvcHJvZ21vZGVzL2VnbG90LmVsIHwgMiArLQogMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0 aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvZWdsb3Qu ZWwgYi9saXNwL3Byb2dtb2Rlcy9lZ2xvdC5lbAppbmRleCA0OGVhMzNjM2VlMS4uZDdkOTFiZGRi MDEgMTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL2VnbG90LmVsCisrKyBiL2xpc3AvcHJvZ21v ZGVzL2VnbG90LmVsCkBAIC0yMTYsNyArMjE2LDcgQEAgZWdsb3Qtc2VydmVyLXByb2dyYW1zCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh2aW1yYy1tb2RlIC4gKCJ2aW0tbGFuZ3Vh Z2Utc2VydmVyIiAiLS1zdGRpbyIpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KHB5dGhvbi1tb2RlIHB5dGhvbi10cy1tb2RlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLiAsKGVnbG90LWFsdGVybmF0aXZlcwotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcoInB5bHNwIiAicHlscyIgKCJweXJpZ2h0LWxhbmdzZXJ2ZXIiICItLXN0ZGlv IikgImplZGktbGFuZ3VhZ2Utc2VydmVyIikpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcoInB5bHNwIiAicHlscyIgKCJweXJpZ2h0LWxhbmdzZXJ2ZXIiICItLXN0ZGlv IikgImplZGktbGFuZ3VhZ2Utc2VydmVyIiAicnVmZi1sc3AiKSkpCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICgoanMtanNvbi1tb2RlIGpzb24tbW9kZSBqc29uLXRzLW1vZGUpCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuICwoZWdsb3QtYWx0ZXJuYXRpdmVzICco KCJ2c2NvZGUtanNvbi1sYW5ndWFnZS1zZXJ2ZXIiICItLXN0ZGlvIikKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoInZzY29kZS1qc29u LWxhbmd1YWdlc2VydmVyIiAiLS1zdGRpbyIpCi0tIAoyLjMwLjIKCg== --000000000000eb09bf060aedac37-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 04:19:47 2023 Received: (at 67442) by debbugs.gnu.org; 25 Nov 2023 09:19:47 +0000 Received: from localhost ([127.0.0.1]:37791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6opF-0000ok-3M for submit@debbugs.gnu.org; Sat, 25 Nov 2023 04:19:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6opA-0000oQ-5R; Sat, 25 Nov 2023 04:19:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6ooy-00062W-5m; Sat, 25 Nov 2023 04:19:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0WQzpUp0VoqGXbRCIPr5GnI63uH1FMoPwxWucDF7wgg=; b=huKL4NW1xNiO r83z4fQ9IFPLqteqSsCqzuNZMiXbfNq9iajnHaJGMt88JeEI6pB6Q2xOpigLSc3pxCRTPrxqwOfiZ ULidMqi24tFlHTrxlYkrZiuhQDhHiMpQ6gVu85M337BuRzAY1YQAu7qMm7oPKKLF2IVfJtAlsJ6I2 pGGCjEiFCPrnI3IsBT7KviPVCNVZwTBL9MCE4p6WC6uxRrwrflxOlALV5KZ8zsEu3b/DiWRe4F/gp ge6X/grqaW1ScMftx+c0a5tm+PZxwKksRv6NgZHrFNg5qaco//XQ83x0391I9bvTrO9ks4hX2cxjI CLvXnTtU1BLAqZ2aFMRUyQ==; Date: Sat, 25 Nov 2023 11:19:25 +0200 Message-Id: <83bkbidwbm.fsf@gnu.org> From: Eli Zaretskii To: Niall Dooley In-Reply-To: (message from Niall Dooley on Fri, 24 Nov 2023 23:42:28 +0100) Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67442 Cc: 67442@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 67442 67441 thanks > From: Niall Dooley > Date: Fri, 24 Nov 2023 23:42:28 +0100 > > ruff-lsp [1] is a Language Server Protocol implementation for Ruff [2, > 3], an extremely fast Python linter and code formatter, written in > Rust. > > It supports surfacing Ruff diagnostics and providing Code Actions to > fix them, but is intended to be used alongside another Python LSP in > order to support features like navigation and autocompletion. > > [1]: https://github.com/astral-sh/ruff-lsp > [2]: https://github.com/astral-sh/ruff > [3]: https://docs.astral.sh/ruff/ Thanks, AFAICT this is an exact duplicate of bug#67441. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 06:09:16 2023 Received: (at 67442) by debbugs.gnu.org; 25 Nov 2023 11:09:16 +0000 Received: from localhost ([127.0.0.1]:37978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6qXE-0006oY-Dh for submit@debbugs.gnu.org; Sat, 25 Nov 2023 06:09:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6qXC-0006oI-58 for 67442@debbugs.gnu.org; Sat, 25 Nov 2023 06:09:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6qX1-0007pB-QL; Sat, 25 Nov 2023 06:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=AXebcVZY8Yi93f79FE1wu0fEBCloXQp2dIAEDwfg0eI=; b=VjnhuFUumlXd05dvWa/e GEYc/yZyKj6+JBVAg/r+YC68vdGZpx9WgYhhXZ9VrNePexCNabxe+joTNqqSC53WqP4AuFbJOtq1j tQSnAXvVgeEMdXgjnB0CsmaNGezwJ7mCLhUZ0xbAtImznHPaF51qd6F+H+Ct+5sUALWxmRvU1Cglg qr6cU5vPKgQ0rA1ovQjt16fMy0HcccSsV5rL0ue6VTbNA7prAmpz2CK4r5P8ZwoUHOril+6c+FPxo MehzgvuYm4R6ccevruGh5MjebFgK6TSaMaWmp41u59fE3tQ7gm8P8PgHmVLaH18+6BiXaDgLuiRze dgkGDRvvZngNIA==; Date: Sat, 25 Nov 2023 13:09:00 +0200 Message-Id: <83fs0uccoj.fsf@gnu.org> From: Eli Zaretskii To: Niall Dooley , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from Niall Dooley on Fri, 24 Nov 2023 23:42:28 +0100) Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67442 Cc: 67442@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Niall Dooley > Date: Fri, 24 Nov 2023 23:42:28 +0100 > > ruff-lsp [1] is a Language Server Protocol implementation for Ruff [2, > 3], an extremely fast Python linter and code formatter, written in > Rust. > > It supports surfacing Ruff diagnostics and providing Code Actions to > fix them, but is intended to be used alongside another Python LSP in > order to support features like navigation and autocompletion. What do you mean by "alongside"? João, does Eglot support such "alongside" servers? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 06:47:08 2023 Received: (at 67442) by debbugs.gnu.org; 25 Nov 2023 11:47:08 +0000 Received: from localhost ([127.0.0.1]:38054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6r7q-0002Hx-36 for submit@debbugs.gnu.org; Sat, 25 Nov 2023 06:47:08 -0500 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]:52419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6qhw-0001L5-FY for 67442@debbugs.gnu.org; Sat, 25 Nov 2023 06:20:21 -0500 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-5844bc378feso1538427eaf.0 for <67442@debbugs.gnu.org>; Sat, 25 Nov 2023 03:20:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700911209; x=1701516009; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sWh5kb+IbbYbX79KoMTuEz1Bk5lfNPFqdzevBtLN48k=; b=bFRblNhL3Cf6JC4UeQ5IvW8ELUvz1FKHihEgTOgIwEV6Bpi1hOFXF80E9j4X66jNTu k2M001g05JlkRHzx7BbgTO+p0aT/sxQF0H6nIUd2Lb2bRbQ8ZQq7eFxb7JGxze8Y2GZT Tr7kIEfkMnUSV4eBla8x0DhHVCgEcpxltAJl8mD3tta0yPRaT2sLF4C54KJWmvZ8arWE n+7EGMpQUQwriNSkw2Pq+fmYADdABEcLvGIwtne9hqzmSsBdDhQYBS6aP4Ur0tO4Vq4b GHpiE2bblpjmtzjFXjV5U2f6jrbEt7uKbUezo7Hz06m2VZm4N5PCS2s/7QgJmjeTP1hl TAmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700911209; x=1701516009; 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=sWh5kb+IbbYbX79KoMTuEz1Bk5lfNPFqdzevBtLN48k=; b=HqJyAIfX9hWIVWx5G2voDD9OpB2PWtjv4P/7a3DJf2gCHdSQHOfc/lO3Ceq4l467BX +/kTm8W8EjqV9W+aMeuh2p71qR0sc7crStGz9simEQpn4U2W7bKHLghIrI4u4Qqn6Vr5 kyiYlT80v2tvshcaEGtnpdRiifuPmL/H3yE570c2k2mUO7u1NgxOzIwVa7ig1bUZuFDo jh4Q0gzB6zEsBs8xkta1Ex6eX0ul9qqB0+/Cm9eSLoyf/gmJYtEjEvr3VivLoD3rU+S4 6thvphksx1N9CCBqoJLWPsTb3WLTod4p6yc8/uRlz7CatOJMZzpnWH2gDtnK4d1vtA6X +oKg== X-Gm-Message-State: AOJu0YwJexmJvWOHgrLA/a8fOz6WLbsCjr8xv9VnjjruwlTRVYvANm9i k3HOGSbeQe97dwx962Da4HuSlMU2O15PEgXRU+U= X-Google-Smtp-Source: AGHT+IGt7f0+2F5n8rC8gRb+EjHRVLCKPLjIYbXxXNKH28l+dNPRhjoVvLYTjiOAaqcfc4z5IdwXzj0NY31f6zqFYT8= X-Received: by 2002:a05:6820:168d:b0:581:ea96:f7f3 with SMTP id bc13-20020a056820168d00b00581ea96f7f3mr6158394oob.7.1700911209684; Sat, 25 Nov 2023 03:20:09 -0800 (PST) MIME-Version: 1.0 References: <83fs0uccoj.fsf@gnu.org> In-Reply-To: <83fs0uccoj.fsf@gnu.org> From: Niall Dooley Date: Sat, 25 Nov 2023 12:19:33 +0100 Message-ID: Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67442 X-Mailman-Approved-At: Sat, 25 Nov 2023 06:47:05 -0500 Cc: 67442@debbugs.gnu.org, =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 25 Nov 2023 at 12:09, Eli Zaretskii wrote: > What do you mean by "alongside"? That excerpt is taken directly from the ruff-lsp README. It is not a fully fledged LSP server like pylsp and does not provided features such as candidates for autocompletion that users may expect from an LSP server. To also have such features it must be used with another server. To my knowledge Eglot does not (yet) support the use of multiple servers. In short it is a linter + formatter made available through the LSP protocol. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 07:39:47 2023 Received: (at 67442) by debbugs.gnu.org; 25 Nov 2023 12:39:47 +0000 Received: from localhost ([127.0.0.1]:38086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6rwp-0006Mm-4f for submit@debbugs.gnu.org; Sat, 25 Nov 2023 07:39:47 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:58388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6rwn-0006MZ-J5 for 67442@debbugs.gnu.org; Sat, 25 Nov 2023 07:39:46 -0500 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-507bd19eac8so3678090e87.0 for <67442@debbugs.gnu.org>; Sat, 25 Nov 2023 04:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700915974; x=1701520774; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=o69kJIA0RJFlQkkLa2LLrK2mP5xMqjedbRiMNYMSyc8=; b=UPqFFI9ud7PokjZjtU8H9Mtv4MtEM7x2yOkUsN/0wJjC44BvAp6cD0MgIlFSNZPuL1 tBUDy0ae3e8t5whX0T+QxdqjqHTJcc2VWRgBU9qTED2HiyCBiLLs2l9zJ+0j83HDnUty prNgCDz2pE524CmUOaD96IyvawTwic6kwkd3dVX1/ks3qK6Syv3aHEpAvCtFXVj/y656 +9Oe8G3kcjqykX2milof9yF6cyQ3AWmwcfwunQOT411Orr737TFQym5BWszKtbBups+Q f3hUW+t3mFWvphCKQCiLfIa+QT+EWE+Qc1u0PryCDUgWomydoV9rPyWCTPu4nLVNCig8 H8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700915974; x=1701520774; 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=o69kJIA0RJFlQkkLa2LLrK2mP5xMqjedbRiMNYMSyc8=; b=w2x4QpTgSyxSINsI+sv0Q3xbPj556ewNzOVNwHlL3Zdcnn6V97pQgopXMZxCvBdyIn v3DrnJoxhrdKrVkeCpUU4YFoyG82JXF7qBmt1ARKAgLehVtoeS6eXNPL385jp+d+QeaG eJEYA3LR0H721qXtJZDGRwc49sj3feLxHPCCkkHlF0cM6wpOusEmOp8APluoeudKp3Cy XpUcvb6zM0N8fj4wEJOF11qBftVlHcmASps3xVEYF5bQuHgPUfTXfETmr2kjbfiAPmfX KPLhMVeghnlgFOts1PnDfzkLrL4FvKHDA/P4QW+QpR0Hn03SkhwzRiuY11b4w+kNSGYZ BT9Q== X-Gm-Message-State: AOJu0Yxs0SF5HHsDKSPc0bNpDVcVlWkwL7Ax6lTtgb4VlqwIQd7CfWPb iFiLKsuLXU9eIYtyl+w+UYlyrSLYf0bgAcAlHqs= X-Google-Smtp-Source: AGHT+IE15H+FsYDaW5zuwR9u33+e14siNMY2YawsK18QpbHRmAkRNcPJ24Xki5Y+hAUcq4COpU07dg/CMVuTysI9z0o= X-Received: by 2002:ac2:46ca:0:b0:509:4a02:49f7 with SMTP id p10-20020ac246ca000000b005094a0249f7mr4054466lfo.44.1700915974137; Sat, 25 Nov 2023 04:39:34 -0800 (PST) MIME-Version: 1.0 References: <83fs0uccoj.fsf@gnu.org> In-Reply-To: <83fs0uccoj.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sat, 25 Nov 2023 12:39:22 +0000 Message-ID: Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000006e6c3d060af95c7a" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67442 Cc: Niall Dooley , 67442@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000006e6c3d060af95c7a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 25, 2023, 11:09 Eli Zaretskii wrote: > > From: Niall Dooley > > Date: Fri, 24 Nov 2023 23:42:28 +0100 > > > > ruff-lsp [1] is a Language Server Protocol implementation for Ruff [2, > > 3], an extremely fast Python linter and code formatter, written in > > Rust. > > > > It supports surfacing Ruff diagnostics and providing Code Actions to > > fix them, but is intended to be used alongside another Python LSP in > > order to support features like navigation and autocompletion. > > What do you mean by "alongside"? > > Jo=C3=A3o, does Eglot support such "alongside" servers? > No. This is a feature on my to-do list, but alas I haven't had time to work on it. Jo=C3=A3o > --0000000000006e6c3d060af95c7a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Nov 25, 2023, 11:09 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Niall Dooley <dooleyn@gmail.com>
> Date: Fri, 24 Nov 2023 23:42:28 +0100
>
> ruff-lsp [1] is a Language Server Protocol implementation for Ruff [2,=
> 3], an extremely fast Python linter and code formatter, written in
> Rust.
>
> It supports surfacing Ruff diagnostics and providing Code Actions to > fix them, but is intended to be used alongside another Python LSP in > order to support features like navigation and autocompletion.

What do you mean by "alongside"?

Jo=C3=A3o, does Eglot support such "alongside" servers?

No. This i= s a feature on my to-do list, but alas I haven't had time to work on it= .

Jo=C3=A3o=C2=A0
<= div dir=3D"auto">
--0000000000006e6c3d060af95c7a-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 08:01:25 2023 Received: (at 67442) by debbugs.gnu.org; 25 Nov 2023 13:01:25 +0000 Received: from localhost ([127.0.0.1]:38108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6sHl-00075g-Df for submit@debbugs.gnu.org; Sat, 25 Nov 2023 08:01:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6sHk-00075R-3X for 67442@debbugs.gnu.org; Sat, 25 Nov 2023 08:01:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6sHZ-0004R4-Mf; Sat, 25 Nov 2023 08:01:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tbSWY8YYp+WVlfdWaDQbqwMu+AbLQ9fh5FDKoyqOzpM=; b=Ygy0KxUGWL1LujFNOXLu RhT/lUa8QAUs0wJ1QbY6npkPjQtUOvSEVh2rGktXIAhr+zJrxKTI/KcJavJYzXHhiz5sTZWgB+IQw vJ6FH9PWkid26e+CrsuiHERY8XT/HdlTDv85fyZRH+KlB8r1LV3oTXwRrXRb3Nn4RcHdItx+CbFvS O1aPh61R3Exrcux5E+4yT85YXCf6dY2soDmYPjSzLtFMILSyqlJOgNGLlhS6MJ7qqw6jDpvQt1pja TRWzi2omQCqizr1oHxw1BPHMTLnFXO+sEiGHowfOHZbWPyGO2dQMV+O0pMLmTdgjsuDVeRPIRTUcG YgiHWg2T0rC0KA==; Date: Sat, 25 Nov 2023 15:00:59 +0200 Message-Id: <834jhac7hw.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Sat, 25 Nov 2023 12:39:22 +0000) Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server References: <83fs0uccoj.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67442 Cc: dooleyn@gmail.com, 67442@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Date: Sat, 25 Nov 2023 12:39:22 +0000 > Cc: Niall Dooley , 67442@debbugs.gnu.org > > On Sat, Nov 25, 2023, 11:09 Eli Zaretskii wrote: > > > It supports surfacing Ruff diagnostics and providing Code Actions to > > fix them, but is intended to be used alongside another Python LSP in > > order to support features like navigation and autocompletion. > > What do you mean by "alongside"? > > João, does Eglot support such "alongside" servers? > > No. This is a feature on my to-do list, but alas I haven't had time to work on it. OK, thanks. So AFAIU, we cannot install this change yet, right? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 04:53:29 2023 Received: (at 67442) by debbugs.gnu.org; 26 Nov 2023 09:53:29 +0000 Received: from localhost ([127.0.0.1]:40702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7BpR-0005ue-06 for submit@debbugs.gnu.org; Sun, 26 Nov 2023 04:53:29 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:43052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7BpO-0005uQ-Ir for 67442@debbugs.gnu.org; Sun, 26 Nov 2023 04:53:27 -0500 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507cd62472dso4405531e87.0 for <67442@debbugs.gnu.org>; Sun, 26 Nov 2023 01:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700992395; x=1701597195; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=t3Ze+TunB3+wMaVKu+1xwxVOpom8eb76nd/d3KVNOkM=; b=LKTDFvXh55Z9+bM8w66gjpHNZi4HII4LvypkwSMk42PBRMTjjPUNQ4NMVJgKrK0FgL mAbaHateKUmv/sM5C1Iu7t6ZzS/nic0MPNelf9m1OqDjUVM+A+hku2RZrZZ9Gk6IjD+V bhQNli/JJ8uHkRIhUncMni5ieyBUmbr2heOULtyCflJM/u4uA//e5tGUtX+OdTIPWV75 Z1PFICDray/XcPVMEnZpZAdXOnDkfHYW/3tVLPLFPITdqzPWftN4D1bQNi7VBhgnwnuo 2GfYUWV0efEhl7mPWPMLKvXN+lGMfrGirJGr2TK6/5kDDcs0ZGF/aHXfGoAQdfrtwHBW /vKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700992395; x=1701597195; 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=t3Ze+TunB3+wMaVKu+1xwxVOpom8eb76nd/d3KVNOkM=; b=my05yH8hDz2v/XpVKPlI3eDuaGKbgHH0x6geT0DiBV0aPLovWdejaAY9ZmTRB9IjOB kHpdEkMGtTSMglftmxlXuNmVirjop9GoDVucswG/JXIf4kNbUchryDeryBT21cEKX/Q9 uOJtP06TsAmCPNXiENkC3OTAtOVmZXAn85+CuY6EBC0Ppsh+VgyN3HBEoIr6OjptQ4tx 0k89j+Uyb7L14zjnpWk3aDNh0IqetUB/z2BFKlYZgbkumfuFzIpAnUY/DFu1PzuIKoG0 qc395Nwh/Dxi6uJBaxU36BuU8+F+werEwrRuGKZtK4VjrJbz9SioOdPyDNMHX+YfDtKC 5Dcw== X-Gm-Message-State: AOJu0YxkQvqeOA+nf2eqHgOi3HbEAVSd4U4ngXNCl4Wn1cJTe4cBdOUB k+zx8VEpkAJHG11EzH0am0/cXV5ChM9clxuJako= X-Google-Smtp-Source: AGHT+IFnxc/rrvjLbePO64eKuuiXHwdDOpijclLln/2VcglX1tMR8Q0+YW7iRa46zkSx3CZKva3HWxF+PnFxERbEm2U= X-Received: by 2002:a05:6512:3c89:b0:509:4d3f:a1c4 with SMTP id h9-20020a0565123c8900b005094d3fa1c4mr2767607lfv.12.1700992394590; Sun, 26 Nov 2023 01:53:14 -0800 (PST) MIME-Version: 1.0 References: <83fs0uccoj.fsf@gnu.org> <834jhac7hw.fsf@gnu.org> In-Reply-To: <834jhac7hw.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sun, 26 Nov 2023 09:53:02 +0000 Message-ID: Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server To: Eli Zaretskii Content-Type: multipart/alternative; boundary="00000000000071fe32060b0b275d" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67442 Cc: dooleyn@gmail.com, 67442@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000071fe32060b0b275d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 25, 2023, 13:01 Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Date: Sat, 25 Nov 2023 12:39:22 +0000 > > Cc: Niall Dooley , 67442@debbugs.gnu.org > > > > On Sat, Nov 25, 2023, 11:09 Eli Zaretskii wrote: > > > > > It supports surfacing Ruff diagnostics and providing Code Actions to > > > fix them, but is intended to be used alongside another Python LSP in > > > order to support features like navigation and autocompletion. > > > > What do you mean by "alongside"? > > > > Jo=C3=A3o, does Eglot support such "alongside" servers? > > > > No. This is a feature on my to-do list, but alas I haven't had time to > work on it. > > OK, thanks. So AFAIU, we cannot install this change yet, right? > We can. If you read this patch it establishes ruff as an "alternative" ('eglot-alternative'), not as an "alongside" companion. But just because we can doesn't mean we should. It's possible that the ruff server wasn't meant to be a full alternative to those other servers. Reading from its website hints ruff is mainly a linter, so it has a fraction of what other servers have The proponents of this patch should argue in terms of ruff-only LSP support in python buffers. Maybe enough value that it's reasonable to install as-is, maybe not and we should wait for 'eglot-alongside'. Or just wait for someone to code a flymake-ruff backend in python-mode.el. That seems much more promising way to get the intended ruff experience into Emacs. There is also the common misconception (not sure if the case here) that if a server isn't mentioned in 'eglot-server-programs' directly then Eglot doesn't support it. And this is far from the truth: if 'ruff' is installed in a user's machine M-x eglot can easily be made to prompt for it. I've tried dozens of servers like that. Jo=C3=A3o --00000000000071fe32060b0b275d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Nov 25, 2023, 13:01 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>= ;
> Date: Sat, 25 Nov 2023 12:39:22 +0000
> Cc: Niall Dooley <dooleyn@gmail.com>, 67442@debbugs.gnu.or= g
>
> On Sat, Nov 25, 2023, 11:09 Eli Zaretskii <eliz@gnu.org> wrote: >
>=C2=A0 > It supports surfacing Ruff diagnostics and providing Code A= ctions to
>=C2=A0 > fix them, but is intended to be used alongside another Pyth= on LSP in
>=C2=A0 > order to support features like navigation and autocompletio= n.
>
>=C2=A0 What do you mean by "alongside"?
>
>=C2=A0 Jo=C3=A3o, does Eglot support such "alongside" servers= ?
>
> No. This is a feature on my to-do list, but alas I haven't had tim= e to work on it.

OK, thanks.=C2=A0 So AFAIU, we cannot install this change yet, right?

We can= . If you read this patch it establishes ruff as an "alternative" = ('eglot-alternative'), not as an "alongside" companion.

But just because we can d= oesn't mean we should. It's possible that the ruff server wasn'= t meant to be a full alternative to those other servers. Reading from its w= ebsite hints ruff is mainly a linter, so it has a fraction of what other se= rvers have=C2=A0

The pro= ponents of this patch should argue in terms of ruff-only LSP support in pyt= hon buffers. Maybe enough value that it's reasonable to install as-is, = maybe not and we should wait for 'eglot-alongside'.

Or just wait for someone to code a fl= ymake-ruff backend in python-mode.el. That seems much more promising way to= get the intended ruff experience into Emacs.=C2=A0
=
There is also the common misconception (not sur= e if the case here) that if a server isn't mentioned in 'eglot-serv= er-programs' directly then Eglot doesn't support it. And this is fa= r from the truth: if 'ruff' is installed in a user's machine M-= x eglot can easily be made to prompt for it. I've tried dozens of serve= rs like that.

Jo=C3=A3o<= /div>


--00000000000071fe32060b0b275d-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 09:18:02 2023 Received: (at 67442) by debbugs.gnu.org; 27 Nov 2023 14:18:02 +0000 Received: from localhost ([127.0.0.1]:43577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7cR0-0000qZ-4K for submit@debbugs.gnu.org; Mon, 27 Nov 2023 09:18:02 -0500 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]:48513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7YlO-00006U-7b for 67442@debbugs.gnu.org; Mon, 27 Nov 2023 05:22:51 -0500 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-58d54612d9cso940641eaf.1 for <67442@debbugs.gnu.org>; Mon, 27 Nov 2023 02:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701080558; x=1701685358; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g37fp9uxHhsF8hd4t56GhocBGQtlgpbvHl28pCn9dQ0=; b=EmmQNF8WJJiRFSMGgJ6oebVgkLiYRDyyyxq8Vik2UYSm21o/Pf6H8ZxgtPtaeatBrS j1qsvWH3/93bQG0yp6thxJswGjw4qlEZuA/wmOtA+P8T0y0IIKMTZS9/fCoGLZe5a+jU s9HW/JybLdWYoiSybz4Auh31q/0IyfcjqpsQnVd1TiGAvqguakqkq752Fwh0R73bAwFc abZgCqEd7ABb+FzxmVpk2yJYaK8LKL6K4gjNdu3IkFv/5AouCuW7kVcV7fw+NNmxcGGs 7byf6JLD76/NcK8fV35AJsG0z40tyvBLLPx9a+kaiYZKMeyH8hA3dRNphlZJBVn9L9mL gKrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701080558; x=1701685358; h=content-transfer-encoding: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=g37fp9uxHhsF8hd4t56GhocBGQtlgpbvHl28pCn9dQ0=; b=U5Cg/UB0QRzUSv+3eW7kvS5NKhukNkOUlBQiKYl/gnY4iremKF7GUPq83YrNXbr6Rr +YKSpugJnzH5d3RoniOXaCDegW6KEAUb5M8WLjkPgbIb94bfsDConT5DyzcBt8nWQlsF 9kuHmWfVRskJkw7I/IMOD/IIe8k8BjtklAjlFKIGrr+ZSQIkb8I/sBXnTmuLM3cp2zTH jHvASM3zijqWISrfZzqib1qbkjacv7cX2/VXOHQ8hGnG0iARKhwJPG++48jc/nH9CcAy 1LBwis1WXvwru1CMNTGy3kDm09KwjEAt3OSvYhVHJZH9w9qfDrPlwTmYR+bvSTWD5pWw eYOQ== X-Gm-Message-State: AOJu0Yzk/ZV5skhiDHNyxBMiYBzDMcEeb9ZOL06Z7UpEKi9m5lBZV3HP H41YeEDFhQ62baqQ5R0F/TahlpYQnhkaCpUw8cA= X-Google-Smtp-Source: AGHT+IF0B3iDhzz8cXKRlFoFsSQo9nTv2SxlrKENy7fZ1fe9U/r1TUcVs2aeOkXdjT9DWLME/bkYIeK84oUpAV45t4A= X-Received: by 2002:a05:6820:514:b0:58d:9d79:abc with SMTP id m20-20020a056820051400b0058d9d790abcmr592532ooj.1.1701080558299; Mon, 27 Nov 2023 02:22:38 -0800 (PST) MIME-Version: 1.0 References: <83fs0uccoj.fsf@gnu.org> <834jhac7hw.fsf@gnu.org> In-Reply-To: From: Niall Dooley Date: Mon, 27 Nov 2023 11:22:02 +0100 Message-ID: Subject: Re: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67442 X-Mailman-Approved-At: Mon, 27 Nov 2023 09:18:01 -0500 Cc: Eli Zaretskii , 67442@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, 26 Nov 2023 at 10:53, Jo=C3=A3o T=C3=A1vora = wrote: > But just because we can doesn't mean we should. It's possible that the ruff server wasn't meant to be a full alternative to those other servers. Reading from its website hints ruff is mainly a linter, so it has a fraction of what other servers have It is also a formatter but yes it does not provide all the features one might expect from an LSP server. Do the others? I don't know if it will provide other features in the future. I presume if more features are added to ruff then they would also be added to ruff-lsp. > The proponents of this patch should argue in terms of ruff-only LSP support in python buffers. Maybe enough value that it's reasonable to install as-is, maybe not and we should wait for 'eglot-alongside'. My argument for its inclusion is that it is a server adhering to the LSP protocol and thus can be listed as an alternative. Its inclusion offers users the choice to use it or not. It would mean users would not have to write, install or configure built-in or third party packages to use ruff to lint, format or organize imports in their python projects. They would simply need to open a python file and M-x eglot to have ruff perform these functions. I think users aware of it will be aware of its capabilities and limitations. Ruff is a young project but quickly replacing the other linters/formatters in the python ecosystem within a single tool. Counter argument a ruff plugin exists for pylsp which is already listed as an alternative and offers other LSP features not provided by ruff-lsp. > Or just wait for someone to code a flymake-ruff backend in python-mode.el. That seems much more promising way to get the intended ruff experience into Emacs. That already exists [1] but I've been able to have ruff lint my code by simply setting `python-flymake-command' as follows: ("ruff" "check" "--quiet" "--stdin-filename=3Dstdin" "-") This doesn't include a "ruff" prefix identifying the source of the flymake report like we get when using it via eglot but I believe that is because servers provides a :source parameter to distinguish multiple sources. Could such a prefix be added to flymake reports when not used via eglot? I think it would be an improvement even if they could only be one source of the report. Neither of these solutions allow the user to make use of the formatting capabilities or other code actions of ruff-lsp. Another package would have to be used to make use of these capabilities. > There is also the common misconception (not sure if the case here) that if a server isn't mentioned in 'eglot-server-programs' directly then Eglot doesn't support it. And this is far from the truth: if 'ruff' is installed in a user's machine M-x eglot can easily be made to prompt for it. I've tried dozens of servers like that. Not here but I can see why that might be the case - users may assume those listed in Eglot's README are only those that are supported. Small correction it is 'ruff-lsp' that would need to be installed which naturally includes 'ruff' as a dependency. [1] https://github.com/erickgnavar/flymake-ruff From unknown Mon Aug 18 02:31:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 13 Jan 2024 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator