From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Niall Dooley Newsgroups: gmane.emacs.bugs Subject: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server Date: Fri, 24 Nov 2023 23:42:28 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000eb09bf060aedac37" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26207"; mail-complaints-to="usenet@ciao.gmane.io" To: 67442@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 25 09:18:30 2023 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 1r6nry-0006dl-3j for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Nov 2023 09:18:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6nrW-00046A-EF; Sat, 25 Nov 2023 03:18:02 -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 1r6nrS-00043Y-Jk for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 03:17:58 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6nrS-0002rq-BV for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 03:17:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6nrX-0007cJ-8g for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 03:18:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Niall Dooley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Nov 2023 08:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67442 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170090025829210 (code B ref -1); Sat, 25 Nov 2023 08:18:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Nov 2023 08:17:38 +0000 Original-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 Original-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 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 1r6etC-0002mK-41 for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 17:43:10 -0500 Original-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 Original-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) 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-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 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:274922 Archived-At: --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 WzIsCjN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o KHB5dGhvbi1tb2RlIHB5dGhvbi10cy1tb2RlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLiAsKGVnbG90LWFsdGVybmF0aXZlcwotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcoInB5bHNwIiAicHlscyIgKCJweXJpZ2h0LWxhbmdzZXJ2ZXIiICItLXN0ZGlv IikgImplZGktbGFuZ3VhZ2Utc2VydmVyIikpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcoInB5bHNwIiAicHlscyIgKCJweXJpZ2h0LWxhbmdzZXJ2ZXIiICItLXN0ZGlv IikgImplZGktbGFuZ3VhZ2Utc2VydmVyIiAicnVmZi1sc3AiKSkpCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICgoanMtanNvbi1tb2RlIGpzb24tbW9kZSBqc29uLXRzLW1vZGUpCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuICwoZWdsb3QtYWx0ZXJuYXRpdmVzICco KCJ2c2NvZGUtanNvbi1sYW5ndWFnZS1zZXJ2ZXIiICItLXN0ZGlvIikKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoInZzY29kZS1qc29u LWxhbmd1YWdlc2VydmVyIiAiLS1zdGRpbyIpCi0tIAoyLjMwLjIKCg== --000000000000eb09bf060aedac37--