Start out Copilot2;

Add hidden_action_types to CommandPaletteFilter.
WindowContext.available_actions now returns global actions as well.

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Piotr Osiewicz
2023-12-05 14:57:20 +01:00
co-authored by Antonio
parent 001ce47a0c
commit b73ccc8180
8 changed files with 388 additions and 357 deletions
+3 -3
View File
@@ -101,7 +101,7 @@ pub fn init(cx: &mut AppContext) {
// will be initialized as disabled by default, so we filter its commands
// out when starting up.
cx.update_default_global::<CommandPaletteFilter, _, _>(|filter, _| {
filter.filtered_namespaces.insert("vim");
filter.hidden_namespaces.insert("vim");
});
cx.update_global(|vim: &mut Vim, cx: &mut AppContext| {
vim.set_enabled(settings::get::<VimModeSetting>(cx).0, cx)
@@ -477,9 +477,9 @@ impl Vim {
cx.update_default_global::<CommandPaletteFilter, _, _>(|filter, _| {
if self.enabled {
filter.filtered_namespaces.remove("vim");
filter.hidden_namespaces.remove("vim");
} else {
filter.filtered_namespaces.insert("vim");
filter.hidden_namespaces.insert("vim");
}
});