ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-ruff

by LDAP ST3 Trending

LSP helper for ruff - an extremely fast Python linter, written in Rust.

Details

Installs

  • Total 2K
  • Win 562
  • Mac 653
  • Linux 585
Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15
Windows 2 1 1 2 3 1 1 2 4 1 1 2 0 1 4 0 1 2 2 1 4 5 3 8 4 0 4 2 3 3 1 5 3 0 3 1 0 3 3 0 2 4 2 1 1 2
Mac 2 7 7 6 3 3 4 4 6 1 5 2 0 3 2 2 3 4 3 1 4 0 14 0 1 2 0 1 5 1 2 2 4 1 3 1 3 1 6 2 5 6 4 3 3 5
Linux 4 7 6 4 6 4 3 2 2 1 2 1 1 4 1 1 1 3 2 1 2 3 7 2 1 3 0 4 2 3 2 4 1 2 5 1 3 2 1 1 4 1 0 1 2 3

Readme

Source
raw.​githubusercontent.​com

LSP-ruff

This is a helper package that automatically installs and updates ruff-lsp for you. Ruff is an extremely fast Python linter and code transformation tool, written in Rust.

Requirements

To use this package, you must have:

  • An executable python (on Windows) or python3 (on Linux/macOS)
  • The LSP package
  • For Ubuntu and Debian users, you must also install python3-venv with apt
  • It's recommended to also install the LSP-json package which will provide auto-completion and validation for this package's settings.

Configuration

There are multiple ways to configure the package and the language server.

  • Global configuration: Preferences > Package Settings > LSP > Servers > LSP-ruff
  • Project-specific configuration: From the Command Palette run Project: Edit Project and add your settings in:

    {
        "settings": {
            "LSP": {
                "LSP-ruff": {
                    "initializationOptions": {
                        "settings": {
                            // Put your settings here
                        }
                    }
                }
            }
        }
    }
    

Code Actions on Save

The following “code actions on save” are supported:

  • source.fixAll
  • source.organizeImports
  • source.fixAll.ruff
  • source.organizeImports.ruff

You can use those with the lsp_code_actions_on_save LSP Setting to automatically apply specific actions on saving the file.