settings: Flatten code actions formatters object (#39375)

Closes #ISSUE

Release Notes:

- settings: Changed code action format in `formatter` and
`format_on_save` settings.

**Previous format:**
```
{
  "code_actions": {
    "source.organizeImports": true,
    "source.fixAll": true
  }
}
```

**New format:**
```
[
  {"code_action": "source.organizeImports"},
  {"code_action": "source.fixAll"}
]
```

After #39246, code actions run sequentially in order. The structure now
reflects this and aligns with other formatter options (e.g., language
servers).

Both the `formatter` and `format_on_save` settings will be
auto-migrated.
This commit is contained in:
Ben Kunkle
2025-10-02 14:48:15 +00:00
committed by GitHub
parent 179fb21778
commit 6fbbdb3512
8 changed files with 878 additions and 348 deletions
@@ -802,8 +802,8 @@ pub enum Formatter {
/// The arguments to pass to the program.
arguments: Option<Arc<[String]>>,
},
/// Files should be formatted using code actions executed by language servers.
CodeActions(HashMap<String, bool>),
/// Files should be formatted using a code action executed by language servers.
CodeAction(String),
}
/// The settings for indent guides.