Skip to content

lsp_format_on_save deleting entire file contents #49

@staticf0x

Description

@staticf0x

When hitting ctrl+s to save a file, the LSP action to format a file is invoked. I found the ruff plugin to be the cause, here's the log file from python-lsp-server:

2023-10-18 08:41:40,113 CEST - ERROR - pylsp_ruff.plugin - Error running ruff: error: unexpected argument '--format' found

  tip: to pass '--format' as a value, use '-- --format'

Usage: ruff check <--verbose|--quiet|--silent> [FILES]...

For more information, try '--help'.

Seems like this option is deprecated in 0.1.0: astral-sh/ruff#7984

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions