keymap_ui: Remove feature flag (#34568)
Closes #ISSUE Release Notes: - Rebound the keystroke to open the keymap file, to open the new keymap editor
This commit is contained in:
parent
13f4a093c8
commit
a6a7a1cc28
3 changed files with 2 additions and 41 deletions
|
@ -586,7 +586,7 @@
|
||||||
"ctrl-shift-f": "pane::DeploySearch",
|
"ctrl-shift-f": "pane::DeploySearch",
|
||||||
"ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
|
"ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
|
||||||
"ctrl-shift-t": "pane::ReopenClosedItem",
|
"ctrl-shift-t": "pane::ReopenClosedItem",
|
||||||
"ctrl-k ctrl-s": "zed::OpenKeymap",
|
"ctrl-k ctrl-s": "zed::OpenKeymapEditor",
|
||||||
"ctrl-k ctrl-t": "theme_selector::Toggle",
|
"ctrl-k ctrl-t": "theme_selector::Toggle",
|
||||||
"ctrl-t": "project_symbols::Toggle",
|
"ctrl-t": "project_symbols::Toggle",
|
||||||
"ctrl-p": "file_finder::Toggle",
|
"ctrl-p": "file_finder::Toggle",
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"cmd-shift-f": "pane::DeploySearch",
|
"cmd-shift-f": "pane::DeploySearch",
|
||||||
"cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
|
"cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
|
||||||
"cmd-shift-t": "pane::ReopenClosedItem",
|
"cmd-shift-t": "pane::ReopenClosedItem",
|
||||||
"cmd-k cmd-s": "zed::OpenKeymap",
|
"cmd-k cmd-s": "zed::OpenKeymapEditor",
|
||||||
"cmd-k cmd-t": "theme_selector::Toggle",
|
"cmd-k cmd-t": "theme_selector::Toggle",
|
||||||
"cmd-t": "project_symbols::Toggle",
|
"cmd-t": "project_symbols::Toggle",
|
||||||
"cmd-p": "file_finder::Toggle",
|
"cmd-p": "file_finder::Toggle",
|
||||||
|
|
|
@ -6,7 +6,6 @@ use std::{
|
||||||
use anyhow::{Context as _, anyhow};
|
use anyhow::{Context as _, anyhow};
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use editor::{CompletionProvider, Editor, EditorEvent};
|
use editor::{CompletionProvider, Editor, EditorEvent};
|
||||||
use feature_flags::FeatureFlagViewExt;
|
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use fuzzy::{StringMatch, StringMatchCandidate};
|
use fuzzy::{StringMatch, StringMatchCandidate};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
|
@ -33,7 +32,6 @@ use workspace::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
SettingsUiFeatureFlag,
|
|
||||||
keybindings::persistence::KEYBINDING_EDITORS,
|
keybindings::persistence::KEYBINDING_EDITORS,
|
||||||
ui_components::table::{Table, TableInteractionState},
|
ui_components::table::{Table, TableInteractionState},
|
||||||
};
|
};
|
||||||
|
@ -48,7 +46,6 @@ actions!(
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
const KEYMAP_EDITOR_NAMESPACE: &'static str = "keymap_editor";
|
|
||||||
actions!(
|
actions!(
|
||||||
keymap_editor,
|
keymap_editor,
|
||||||
[
|
[
|
||||||
|
@ -115,42 +112,6 @@ pub fn init(cx: &mut App) {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
cx.observe_new(|_workspace: &mut Workspace, window, cx| {
|
|
||||||
let Some(window) = window else { return };
|
|
||||||
|
|
||||||
let keymap_ui_actions = [std::any::TypeId::of::<OpenKeymapEditor>()];
|
|
||||||
|
|
||||||
command_palette_hooks::CommandPaletteFilter::update_global(cx, |filter, _cx| {
|
|
||||||
filter.hide_action_types(&keymap_ui_actions);
|
|
||||||
filter.hide_namespace(KEYMAP_EDITOR_NAMESPACE);
|
|
||||||
});
|
|
||||||
|
|
||||||
cx.observe_flag::<SettingsUiFeatureFlag, _>(
|
|
||||||
window,
|
|
||||||
move |is_enabled, _workspace, _, cx| {
|
|
||||||
if is_enabled {
|
|
||||||
command_palette_hooks::CommandPaletteFilter::update_global(
|
|
||||||
cx,
|
|
||||||
|filter, _cx| {
|
|
||||||
filter.show_action_types(keymap_ui_actions.iter());
|
|
||||||
filter.show_namespace(KEYMAP_EDITOR_NAMESPACE);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
command_palette_hooks::CommandPaletteFilter::update_global(
|
|
||||||
cx,
|
|
||||||
|filter, _cx| {
|
|
||||||
filter.hide_action_types(&keymap_ui_actions);
|
|
||||||
filter.hide_namespace(KEYMAP_EDITOR_NAMESPACE);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.detach();
|
|
||||||
})
|
|
||||||
.detach();
|
|
||||||
|
|
||||||
register_serializable_item::<KeymapEditor>(cx);
|
register_serializable_item::<KeymapEditor>(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue