Add a command to expand the context for a multibuffer (#10300)

This PR adds an action to expand the excerpts lines of context in a
multibuffer.

Release Notes:

- Added an `editor::ExpandExcerpts` action (bound to `shift-enter` by
default), which can expand the excerpt the cursor is currently in by 3
lines. You can customize the number of lines by rebinding this action
like so:

```json5
// In your keybindings array...
  {
    "context": "Editor && mode == full",
    "bindings": {
      "shift-enter": ["editor::ExpandExcerpts", { "lines": 5 }],
    }
  }
```

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Mikayla Maki 2024-04-19 14:27:56 -07:00 committed by GitHub
parent 9d9bce08a7
commit 8a02159b82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 353 additions and 45 deletions

View file

@ -47,6 +47,7 @@ pub enum IconName {
ChevronLeft,
ChevronRight,
ChevronUp,
ExpandVertical,
Close,
Collab,
Command,
@ -149,6 +150,7 @@ impl IconName {
IconName::ChevronLeft => "icons/chevron_left.svg",
IconName::ChevronRight => "icons/chevron_right.svg",
IconName::ChevronUp => "icons/chevron_up.svg",
IconName::ExpandVertical => "icons/expand_vertical.svg",
IconName::Close => "icons/x.svg",
IconName::Collab => "icons/user_group_16.svg",
IconName::Command => "icons/command.svg",