# Fix formatters not running in order \(\#24584\) · gitcafe/zed

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

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

Visibility: public

Requested revision: dab9c4179932f40792f8e1da0a11c0a09c89d41c

Requested commit: dab9c4179932f40792f8e1da0a11c0a09c89d41c

Commit: dab9c4179932f40792f8e1da0a11c0a09c89d41c

Tree: 8ecb84fbb9793d4f0f5c6f90521d4bec189e6704

Author: Ben Kunkle

Committer: GitHub

## Message

```
Fix formatters not running in order (#24584)

Previously, if multiple formatters were specified for the same language,
they would be run in parallel on the state of the file, and then all
edits would be applied. This lead to incorrect output with many unwanted
artifacts.
This PR refactors the formatting code to clean it up, and ensure results
from previous formatters are passed in to subsequent formatters.

Closes #15544

Release Notes:

- Fixed an issue where when running multiple formatters they would be
ran in parallel rather than sequentially, leading to unwanted artifacts
and incorrect output.

---------

Co-authored-by: Conrad <conrad@zed.dev>
```

## Parents

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

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