# Add \`"code_actions_on_format"\` \(\#7860\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ea322e1d1c7311fff0df7f1e4e7145f7199e6e61)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ea322e1d1c7311fff0df7f1e4e7145f7199e6e61

Requested commit: ea322e1d1c7311fff0df7f1e4e7145f7199e6e61

Commit: ea322e1d1c7311fff0df7f1e4e7145f7199e6e61

Tree: 2238d27cb82a95a80c3dd6736a85a694624d3102

Author: Conrad Irwin

Committer: GitHub

## Message

```
Add `"code_actions_on_format"` (#7860)

This lets Go programmers configure `"code_actions_on_format": {
  "source.organizeImports": true,
}` so that they don't have to manage their imports manually

I landed on `code_actions_on_format` instead of `code_actions_on_save`
(the
VSCode version of this) because I want to run these when I explicitly
format
(and not if `format_on_save` is disabled).

Co-Authored-By: Thorsten <thorsten@zed.dev>

Release Notes:

- Added `"code_actions_on_format"` to control additional formatting
steps on format/save
([#5232](https://github.com/zed-industries/zed/issues/5232)).
- Added a `"code_actions_on_format"` of `"source.organizeImports"` for
Go ([#4886](https://github.com/zed-industries/zed/issues/4886)).

Co-authored-by: Thorsten <thorsten@zed.dev>
```

## Parents

- [e1ae0d46da89e0786b3a4e22ecbb55f7b5aa1274](https://git.cafe/gitcafe/zed/commit/e1ae0d46da89e0786b3a4e22ecbb55f7b5aa1274?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ea322e1d1c7311fff0df7f1e4e7145f7199e6e61?format=markdown)
