Python#
Server#
For more information about the LSP server, check ruff.
Installation#
pip install ruff (previous pip install ruff-lsp)
Debugger: Not available#
Available configurations#
lsp-ruff-advertize-fix-all#
Type: boolean
Default: t
Whether to report ability to handle source.fixAll actions.
lsp-ruff-advertize-organize-imports#
Type: boolean
Default: t
Whether to report ability to handle source.organizeImports actions.
lsp-ruff-import-strategy#
Type: (choice (const fromEnvironment) (const useBundled))
Default: fromEnvironment
Where ruff is imported from if lsp-ruff-ruff-path is not set.
lsp-ruff-lint-enable#
Type: boolean
Default: t
Whether to enable linting.
lsp-ruff-lint-extend-select#
Type: (lsp-repeatable-vector string)
Default: nil
A list of rule codes or prefixes to enable, in addition to select.
When nil (the default), the setting is not sent to ruff at all.
Note that an empty vector explicitly selects no extra rules and
overrides configuration files.
lsp-ruff-lint-ignore#
Type: (lsp-repeatable-vector string)
Default: nil
A list of rule codes or prefixes to ignore.
When nil (the default), the setting is not sent to ruff at all.
Note that an empty vector explicitly ignores nothing, but still
overrides the ignore list from configuration files.
lsp-ruff-lint-select#
Type: (lsp-repeatable-vector string)
Default: nil
A list of rule codes or prefixes to enable. When nil (the default), the setting is not sent to ruff at all and ruff uses its default rules and any configuration files (e.g. pyproject.toml). Note that an empty vector explicitly selects zero rules, silencing all lint diagnostics.
lsp-ruff-log-level#
Type: (choice (const debug) (const error) (const info) (const off) (const warn))
Default: error
Tracing level.
lsp-ruff-multi-root#
Type: boolean
Default: t
If non nil, lsp-ruff will be started in multi-root mode.
lsp-ruff-python-path#
Type: string
Default: python3
Path to the Python interpreter.
lsp-ruff-ruff-args#
Type: (repeat string)
Default: nil
Arguments, passed to ruff.
lsp-ruff-server-command#
Type: (repeat string)
Default: (ruff server)
Command to start ruff lsp. Previous ruff-lsp should change this to ("ruff-lsp")
lsp-ruff-show-notifications#
Type: (choice (const off) (const onError) (const onWarning) (const always))
Default: off
When notifications are shown.