# Revert "lsp: Parse LSP messages on background thread \- again \(\#23122\)" \(\#23301\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a247617d6f8b5a0b527db0636a413fdf9a06dfee

Requested commit: a247617d6f8b5a0b527db0636a413fdf9a06dfee

Commit: a247617d6f8b5a0b527db0636a413fdf9a06dfee

Tree: 5ce54e023eb85d86a6861603104d71fcde76c099

Author: Conrad Irwin

Committer: GitHub

## Message

```
Revert "lsp: Parse LSP messages on background thread - again (#23122)" (#23301)

This reverts commit 1b3b825c7f646f2fb34e2bceb6be33f310dfeb59.

When debugging git diffs we found that this introduced a re-ordering of
messages sent to the LSP:

* User hits "format"
* Zed adjusts spacing, and sends "spaces changed" to the LSP
* Zed sends "format" to LSP

With the async approach here, the format request can now arrive before
the space changed request.

You can reproduce this with `test_strip_whitespace_and_format_via_lsp`
under some conditions.

Release Notes:

- N/A
```

## Parents

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

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