# editor: Extract rewrap and config out of \`editor.rs\` \(\#55855\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b470b50d5282937f1afe4069f14128252740246c

Requested commit: b470b50d5282937f1afe4069f14128252740246c

Commit: b470b50d5282937f1afe4069f14128252740246c

Tree: 58a053767c869d8808101d6ce9e625649edd7472

Author: Mikhail Pertsev

Committer: GitHub

## Message

```
editor: Extract rewrap and config out of `editor.rs` (#55855)

cc @SomeoneToIgnore

## Summary

Follow-up to https://github.com/zed-industries/zed/discussions/55352,
where the conclusion was to split `editor.rs` incrementally by topic
instead of all at once.

This mechanically extracts editor config and reflow-related code into
`crates/editor/src/config.rs` and `crates/editor/src/rewrap.rs`, while
preserving existing behavior and keeping externally-used APIs public
where needed.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

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

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