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.

Labels lsp, python

Details

Installs

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

Readme

Source
raw.​githubusercontent.​com

LSP-ruff

This is a helper package that automatically installs and updates ruff 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": {
                    "initialization_options": {
                        // 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.