diff --git a/src/lsp/ext.rs b/src/lsp/ext.rs index af5a8f89..48d9a9f3 100644 --- a/src/lsp/ext.rs +++ b/src/lsp/ext.rs @@ -88,3 +88,27 @@ pub mod testing { const METHOD: &'static str = "cairo/projectUpdatingFinished"; } } + +#[derive(Debug)] +pub struct ScarbPathMissing {} + +impl Notification for ScarbPathMissing { + type Params = (); + const METHOD: &'static str = "scarb/could-not-find-scarb-executable"; +} + +#[derive(Debug)] +pub struct ScarbResolvingStart {} + +impl Notification for ScarbResolvingStart { + type Params = (); + const METHOD: &'static str = "scarb/resolving-start"; +} + +#[derive(Debug)] +pub struct ScarbResolvingFinish {} + +impl Notification for ScarbResolvingFinish { + type Params = (); + const METHOD: &'static str = "scarb/resolving-finish"; +} diff --git a/src/toolchain/scarb.rs b/src/toolchain/scarb.rs index 6f65aa8f..9db0b6a7 100644 --- a/src/toolchain/scarb.rs +++ b/src/toolchain/scarb.rs @@ -10,6 +10,7 @@ use tracing::{error, warn}; use which::which; use crate::env_config; +use crate::lsp::ext::{ScarbPathMissing, ScarbResolvingFinish, ScarbResolvingStart}; use crate::server::client::Notifier; pub const SCARB_TOML: &str = "Scarb.toml"; @@ -194,27 +195,3 @@ impl ScarbToolchain { Ok(version) } } - -#[derive(Debug)] -struct ScarbPathMissing {} - -impl Notification for ScarbPathMissing { - type Params = (); - const METHOD: &'static str = "scarb/could-not-find-scarb-executable"; -} - -#[derive(Debug)] -struct ScarbResolvingStart {} - -impl Notification for ScarbResolvingStart { - type Params = (); - const METHOD: &'static str = "scarb/resolving-start"; -} - -#[derive(Debug)] -struct ScarbResolvingFinish {} - -impl Notification for ScarbResolvingFinish { - type Params = (); - const METHOD: &'static str = "scarb/resolving-finish"; -}