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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user