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.
To use this package, you must have:
python
(on Windows) or python3
(on Linux/macOS)There are multiple ways to configure the package and the language server.
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
}
}
}
}
}
}
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.