Skip to content

Ruff-specific source actions are not working with ruff server #10780

@snowsignal

Description

@snowsignal

VS Code configuration like the following will work as expected:

{
    "[python]": {
      "editor.codeActionsOnSave": {
        "source.organizeImports": "explicit",
      },
    }
}

but this configuration:

{
    "[python]": {
      "editor.codeActionsOnSave": {
        "source.organizeImports.ruff": "explicit",
      },
    }
}

does not work.

The problem here is that when we create the source code action, the kind is always set to source.{fixAll | organizeImports}. Since the client is expected a code action of kind source.{fixAll | organizeImports}.ruff, the code action we return will not get resolved.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserverRelated to the LSP server

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