unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Niall Dooley <dooleyn@gmail.com>
To: 67442@debbugs.gnu.org
Subject: bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server
Date: Fri, 24 Nov 2023 23:42:28 +0100	[thread overview]
Message-ID: <CADS3Lq4sAqT4vVyBm73A4B-U0erdmMCEY+voftkDRorxxNZwZg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

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

[-- Attachment #2: 0001-eglot-Add-ruff-lsp-as-an-alternative-python-server.patch --]
[-- Type: text/x-patch, Size: 1693 bytes --]

From b1cfc2d980adb3f9963ab2c8607f4fa78e356a2d Mon Sep 17 00:00:00 2001
From: Niall Dooley <dooleyn@gmail.com>
Date: Fri, 24 Nov 2023 16:21:39 +0100
Subject: [PATCH] eglot: Add ruff-lsp as an alternative python server

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


             reply	other threads:[~2023-11-24 22:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24 22:42 Niall Dooley [this message]
2023-11-25  9:19 ` bug#67442: [PATCH] eglot: Add ruff-lsp as an alternative python server Eli Zaretskii
2023-11-25 11:09 ` Eli Zaretskii
2023-11-25 11:19   ` Niall Dooley
2023-11-25 12:39   ` João Távora
2023-11-25 13:00     ` Eli Zaretskii
2023-11-26  9:53       ` João Távora
2023-11-27 10:22         ` Niall Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADS3Lq4sAqT4vVyBm73A4B-U0erdmMCEY+voftkDRorxxNZwZg@mail.gmail.com \
    --to=dooleyn@gmail.com \
    --cc=67442@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).