# editor: Add Organize Imports Action \(\#25793\) · gitcafe/zed

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

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

Visibility: public

Requested revision: fad4df5e702b1def8ca81cebb49f527c39b4794c

Requested commit: fad4df5e702b1def8ca81cebb49f527c39b4794c

Commit: fad4df5e702b1def8ca81cebb49f527c39b4794c

Tree: 7a11b45ec3a4504d758689310b2c97345f834b10

Author: smit

Committer: GitHub

## Message

```
editor: Add Organize Imports Action  (#25793)

Closes #10004

This PR adds support for the organize imports action. Previously, you
had to manually configure it in the settings and then use format to run
it.

Note: Default key binding will be `alt-shift-o` which is similar to
VSCode's organize import. Also, because `cmd-shift-o` is taken by
outline picker.

Todo:

- [x] Initial working
- [x] Handle remote
- [x] Handle multi buffer
- [x] Can we make it generic for executing any code action?

Release Notes:

- Added `editor:OrganizeImports` action to organize imports (sort,
remove unused, etc) for supported LSPs. You can trigger it by using the
`alt-shift-o` key binding.
```

## Parents

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

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