skillfed

python-lsp-ruff

Ruff linting plugin for pylsp

python-lsp-ruff v2.3.1 314.4K downloads/30d#7,701 on PyPI219
Permissive license MIT Active released

What it is and what it does

python-lsp-ruff is a plugin that bridges ruff (a Rust-based Python linter and formatter) into python-lsp-server, the Language Server Protocol implementation for Python. When enabled, it disables pylsp's default linters (pycodestyle, pyflakes, mccabe) and formatters (autopep8, yapf) and replaces them with ruff's implementations, while preserving other pylsp features like go-to-definition support.

The plugin supports ruff's full linting rule set, its formatter (including isort-style import sorting when explicitly enabled), and code actions for both safe and unsafe fixes. Configuration is passed through pylsp's standard settings mechanism and respects pyproject.toml or ruff.toml files in the project root. It requires ruff, python-lsp-server, cattrs, lsprotocol, and tomli as runtime dependencies.

Use it for:

  • Use it to add ruff's fast linting and formatting to any LSP-aware editor (Neovim, VS Code, Emacs) that uses python-lsp-server.
  • Use it to consolidate linting and formatting under a single tool (ruff) while keeping other pylsp features like symbol navigation.
  • Use it to enforce custom ruff rules and severity levels across a team via shared pyproject.toml or ruff.toml configuration.
  • Use it to apply ruff's code actions and automatic fixes directly from your editor's code-action menu.
  • Use it when you want ruff's performance and modern rule set but need LSP integration rather than a standalone CLI.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates ruff's linting, formatting, and code-action capabilities into python-lsp-server, allowing LSP clients to use ruff as the primary linter and formatter alongside other pylsp features.

Yes. The plugin is actively maintained, has low install friction, carries no security vulnerabilities, and integrates a fast modern linter into the LSP ecosystem. Install it if you use python-lsp-server and want ruff's linting and formatting capabilities available in your editor; skip it only if you prefer ruff's standalone LSP server (ruff>0.4.5) or a different linter altogether.

Install

python-lsp-ruff on PyPI

pip

pip install python-lsp-ruff

uv

uv add python-lsp-ruff

poetry

poetry add python-lsp-ruff

Installing python-lsp-ruff

Before you install

Low friction: pure Python wheel with five runtime dependencies (ruff, python-lsp-server, cattrs, lsprotocol, tomli). Last commit 2026-05-25 and active maintenance status indicate ongoing support.

License in practice

MIT license is permissive; no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install python-lsp-ruff

# In your LSP client config (e.g., neovim):
pylsp = {
  plugins = {
    ruff = {
      enabled = true,
      formatEnabled = true
    }
  }
}

Requires python-lsp-server already installed in the same virtualenv; ruff version compatibility: use python-lsp-ruff v1.5.3 with ruff<0.1.0, or v2.3.1 with ruff>=0.1.0.

Verify before relying

  • Whether unsafe fixes are offered by default or must be explicitly enabled in client configuration.
  • Performance characteristics when linting large codebases compared to standalone ruff or other pylsp plugins.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 5 — ruff, python-lsp-server, cattrs, lsprotocol, tomli
Maintenance actively maintained — 135 days since the last release
Last repo commit
First released
Downloads 314,383/month — #7,701 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_lsp_ruff-2.3.1-py3-none-any.whl

Tags

lsp server ruff pluginpython linting via lspruff code formatting lsppylsp ruff integrationlanguage server protocol linting
lsp-pluginlintingcode-formatting

More Quality Assurance packages