Use proper NodeRuntime in the formatter interface

This commit is contained in:
Kirill Bulatov 2023-09-06 17:23:04 +03:00
parent a420d9cdc7
commit a8387b8b19
10 changed files with 71 additions and 20 deletions

View file

@ -1,18 +1,17 @@
use std::collections::{HashMap, VecDeque};
pub use std::path::{Path, PathBuf};
pub use std::sync::Arc;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use anyhow::Context;
use fs::Fs;
use gpui::ModelHandle;
use language::{Buffer, Diff};
use node_runtime::NodeRuntime;
pub struct Prettier {
_private: (),
}
pub struct NodeRuntime;
#[derive(Debug)]
pub struct LocateStart {
pub worktree_root_path: Arc<Path>,
@ -143,7 +142,7 @@ impl Prettier {
}
}
pub async fn start(prettier_path: &Path, node: Arc<NodeRuntime>) -> anyhow::Result<Self> {
pub async fn start(prettier_path: &Path, node: Arc<dyn NodeRuntime>) -> anyhow::Result<Self> {
todo!()
}