Skip to content

[LSP] source.fixAll code action should be source.fixAll.pyrefly #3024

@rchl

Description

@rchl

Describe the Bug

Pyrefly advertizes support for source.fixAll code action in the initialize response:

{
  "capabilities": {
    "callHierarchyProvider": true,
    "codeActionProvider": {
      "codeActionKinds": [
        "quickfix",
        "refactor.extract",
        "refactor.rewrite",
        "refactor.delete",
        "refactor.move",
        "refactor.inline",
        "source.fixAll"
      ]
    },
  },
  // ...
}

This should actually be source.fixAll.pyrefly which then would allow the editor to only target purefly-specific fixes with:

    "editor.codeActionsOnSave": {
        "source.fixAll.pyrefly": true
    },

Otherwise it's only possible to use:

    "editor.codeActionsOnSave": {
        "source.fixAll": true
    },

which then can trigger fixes from other servers that might be running on the file.

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

Labels

language-serverIssues specific to our IDE integration rather than type checking

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions