From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#67441: [PATCH] eglot: Add ruff-lsp as an alternative python server Date: Thu, 14 Dec 2023 17:22:29 -0800 Message-ID: References: <20231124155236.49559-1-dooleyn@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14446"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Niall Dooley , 67441@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 15 02:23:17 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 1rDwv7-0003aI-Eu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 02:23:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDwux-0004O1-Db; Thu, 14 Dec 2023 20:23:07 -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 1rDwuv-0004Nn-7K for bug-gnu-emacs@gnu.org; Thu, 14 Dec 2023 20:23:05 -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 1rDwus-0003MU-I8 for bug-gnu-emacs@gnu.org; Thu, 14 Dec 2023 20:23:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDwus-0004wt-3B for bug-gnu-emacs@gnu.org; Thu, 14 Dec 2023 20:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 01:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67441 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67441-submit@debbugs.gnu.org id=B67441.170260335818985 (code B ref 67441); Fri, 15 Dec 2023 01:23:02 +0000 Original-Received: (at 67441) by debbugs.gnu.org; 15 Dec 2023 01:22:38 +0000 Original-Received: from localhost ([127.0.0.1]:51322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDwuU-0004w9-6L for submit@debbugs.gnu.org; Thu, 14 Dec 2023 20:22:38 -0500 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:58798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDwuR-0004vv-RT for 67441@debbugs.gnu.org; Thu, 14 Dec 2023 20:22:36 -0500 Original-Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2cc49101044so1462201fa.1 for <67441@debbugs.gnu.org>; Thu, 14 Dec 2023 17:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702603350; x=1703208150; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=KIMjrCKM0a6VhgJbf0AxaUGBUEneXMSGwyaGdSFK4M8=; b=UFJa+IYzqz0B/Z+GRaPSDCxH9Jxwj67k0nhBD8Hj+MjCa/FA8++cNhDIzJZyzjYhMx ld8WQwbZzABiQZTrlMkEAGcm0LVAjK3Sfh118GHE1pa+ruNCBnAVgXu2tLy0aU8yUj6H YbmhleHm8ZZaX0kVMxrVb0BCJNvO4+f3zqKptuhLFNxGbUuLrTlTLCQlDuBXqu68/NvH FjBj5EFic2hqExUQPFdWVYIS+5ZZZ1/8Z4/ULCVQ6RJ013oY2zvsGiuEEPD454XAV0Nw BawgnPGA2ui6+5peiIk3NAPvuVKrmwbfSYztc8mPaVGf8+LG3aARwhyMNLgYvj/GhDs4 rzUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702603350; x=1703208150; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KIMjrCKM0a6VhgJbf0AxaUGBUEneXMSGwyaGdSFK4M8=; b=mrEfMmNfd7JY+isvCOV2S2HzArlK8fp//ASyUGiCfoRGOcNUK5+hTg/Ul40NUw94WA P6cS+a9141pzzxyIeNYugwKmEV+LhQ9GWN/dpiTIoQg9IaRSArmgA/AipsFu/c2L69mx kGx0Qc8iVpULzC4mjNQr9A//vT8V+5gaLhqJTqZs7fNrpJEYguf+iPsyZ4FURZNgUd1v Y/pOug0M4cpyKMy7Khc1gxOANQqjydbuRS9EiI58IlnEfpKlZ0loRuRqYzS8A7FqF8h6 2JBQUYwtU2KAIWzEONTkoqBwpZOKFSkFJOnBQXD7X15PvNfrTLKCdlybUhtzDtEA6+sV t9Eg== X-Gm-Message-State: AOJu0YzUiuFcoNhKtpBWeCMwWMIAUHCqs3+nVO8m4INJG1MENVfev0ny eN0e7y+uTr+BdA0oY6u/ymHSJzzip5eoDFW2E8c= X-Google-Smtp-Source: AGHT+IEamyAJS4TLPuTMyPAhbsEnX6LAWK6QicjeH7LfS1amC80DcFFZ06aMzlJUaZwyVeQNMuFhRb4yW3VBNNlfxMM= X-Received: by 2002:a05:651c:1616:b0:2cc:1fa3:a2c8 with SMTP id f22-20020a05651c161600b002cc1fa3a2c8mr3484597ljq.145.1702603350010; Thu, 14 Dec 2023 17:22:30 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 14 Dec 2023 17:22:29 -0800 In-Reply-To: <20231124155236.49559-1-dooleyn@gmail.com> 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:276245 Archived-At: Niall Dooley writes: > 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/ Jo=C3=A3o, any comments here? Does eglot support running more than one LSP server at the same time? AFAICT, pylsp (for example) has built-in support for ruff, so while I'm sure there's a use case for ruff-lsp, I don't think I currently understand it. In any case, I think the patch seems harmless enough, and could probably be installed as-is. > --- > 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 @@ chosen (interactively or automatically)." > (vimrc-mode . ("vim-language-server" "--= stdio")) > ((python-mode python-ts-mode) > . ,(eglot-alternatives > - '("pylsp" "pyls" ("pyright-langserv= er" "--stdio") "jedi-language-server"))) > + '("pylsp" "pyls" ("pyright-langserv= er" "--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