-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Make FoldAtLevel commands discoverable in command palette #39422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @MunishMummadi on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
some context? Tag/Test/Typo? |
|
It looks like you'll have to add a migration due to the asset changes: https://github.com/zed-industries/zed/blob/main/crates/migrator/src/migrations/m_2025_01_29/keymap.rs#L162 |
|
I can think of 2 ways:
|
11a57c8 to
2f372f8
Compare
|
care to have a look @boj |
|
@MunishMummadi I'm just a curious bystander, but looks good to me 👍 |
render as `editor: fold at level 3` instead of `editor: fold at level3`
This reverts commit d02dd31.
|
Thank you! Excellent contribution. |
|
Maybe a comment would have helped for the spacing. Thank you!! |
|
Hey @MunishMummadi - I wrote the original commands and have been wanting them to be discoverable through the command palette ever since. Thank you! |
|
It is always inspiring to hear from someone I lookup to. Thank you all :) |
…ries#39422) ## Description Fixes zed-industries#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 zed-industries#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>
Description
Fixes #39376
Note: I am new to both rust and zed. I would really appreciate some feedback.
Add individual FoldAtLevel1-9 actions so users can find fold commands in the command palette while keeping existing keybindings.
Closes #39376
Changes
crates/editor/src/actions.rs- Added FoldAtLevel1-9 action structscrates/editor/src/editor.rs- Implemented fold_at_level_1-9 handler methodscrates/editor/src/element.rs- Registered new actionsassets/keymaps/*.json- Updated keybindings to use new individual actionsOther Approaches considered
Release Notes
Release Notes: