repl: Filter commands out of command palette when REPL is disabled (#15016)
This PR makes it so the `repl: ` commands don't appear in the command palette when the REPL feature is disabled. Release Notes: - N/A
This commit is contained in:
parent
a5cb66f0e1
commit
c262c81e52
4 changed files with 43 additions and 18 deletions
|
@ -25,6 +25,14 @@ pub use crate::repl_sessions_ui::{
|
|||
use crate::repl_store::ReplStore;
|
||||
pub use crate::session::Session;
|
||||
|
||||
pub fn init(fs: Arc<dyn Fs>, cx: &mut AppContext) {
|
||||
set_dispatcher(zed_dispatcher(cx));
|
||||
JupyterSettings::register(cx);
|
||||
::editor::init_settings(cx);
|
||||
repl_sessions_ui::init(cx);
|
||||
ReplStore::init(fs, cx);
|
||||
}
|
||||
|
||||
fn zed_dispatcher(cx: &mut AppContext) -> impl Dispatcher {
|
||||
struct ZedDispatcher {
|
||||
dispatcher: Arc<dyn PlatformDispatcher>,
|
||||
|
@ -48,11 +56,3 @@ fn zed_dispatcher(cx: &mut AppContext) -> impl Dispatcher {
|
|||
dispatcher: cx.background_executor().dispatcher.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn init(fs: Arc<dyn Fs>, cx: &mut AppContext) {
|
||||
set_dispatcher(zed_dispatcher(cx));
|
||||
JupyterSettings::register(cx);
|
||||
::editor::init_settings(cx);
|
||||
repl_sessions_ui::init(cx);
|
||||
ReplStore::init(fs, cx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue