ZIm/assets
Marshall Bowers d17c6b392e
Add allow_rewrap setting to control editor::Rewrap behavior for a given language (#25173)
This PR adds a new `allow_rewrap` setting to control how
`editor::Rewrap` behaves for a given language.

This is a language setting, so it can either be configured globally or
within the context of an individual language.

For example:

```json
{
  "allow_rewrap": "in_selections",
  "languages": {
    "Typst": {
      "allow_rewrap": "anywhere"
    }
  }
}
```

There are three different values:

- `in_comment`: Only perform rewrapping within comments.
- `in_selections`: Only perform rewrapping within the current
selection(s).
- `anywhere`: Allow rewrapping anywhere.

The global default is `in_comment`, as it is the most conservative
option and allows rewrapping comments without risking breaking other
syntax.

The `Markdown` and `Plain Text` languages default to `anywhere`, which
mirrors the previous behavior for those language that was hard-coded
into the rewrap implementation.

This setting does not have any effect in Vim mode, as Vim mode already
allowed rewrapping anywhere.

Closes https://github.com/zed-industries/zed/issues/24242.

Release Notes:

- Added an `allow_rewrap` setting to control the `editor::Rewrap`
behavior for a given language.
2025-02-19 16:37:39 +00:00
..
fonts Fix font selection on macOS (#13615) 2024-06-27 17:02:45 -06:00
icons Allow icon themes to provide their own file associations (#24926) 2025-02-15 00:35:13 +00:00
images add ui::Vector and separate images from icons (#17815) 2024-09-13 17:44:16 -04:00
keymaps Don't open file finder menu on command (#25097) 2025-02-18 14:27:10 -07:00
prompts Update suggest_edits prompt to clarify usage of <old_text> when using update/create operations (#22341) 2025-01-08 23:45:15 +00:00
settings Add allow_rewrap setting to control editor::Rewrap behavior for a given language (#25173) 2025-02-19 16:37:39 +00:00
sounds Update collaboration sounds, add sounds to screensharing 2023-07-04 16:18:42 -04:00
themes Revert gutter stripes as indicator of hunk staged status (#25089) 2025-02-18 13:20:39 -05:00