# Make FoldAtLevel commands discoverable in command palette \(\#39422\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 096930817b81282fce639dd642fe72644f72d030

Requested commit: 096930817b81282fce639dd642fe72644f72d030

Commit: 096930817b81282fce639dd642fe72644f72d030

Tree: 9d855ac1138746d4ef9e7b04df577f2ef507b35b

Author: Munish Mummadi

Committer: GitHub

## Message

```
Make FoldAtLevel commands discoverable in command palette (#39422)

## Description
Fixes #39376

Add individual FoldAtLevel1-9 actions so users can find fold commands in
the command palette while keeping existing keybindings.

Migrating user keymaps is necessary to have the keybinds show in the command palette.

Closes #39376 

### Changes
- `crates/editor/src/actions.rs` - Added FoldAtLevel1-9 action structs
- `crates/editor/src/editor.rs` - Implemented fold_at_level_1-9 handler
methods
- `crates/editor/src/element.rs` - Registered new actions
- `assets/keymaps/*.json` - Updated keybindings to use new individual
actions

### Other Approaches considered
- Adding #[serde(default)] to existing FoldAtLevel(u32) - wouldn't make
it discoverable
- Creating a single action with enumerated variants - idk about this
that well.

### Release Notes
Release Notes:
- Added Fold At Level 1-9 actions to the command palette

---------

Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
```

## Parents

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

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