From 3e3b64bb1cf4a642d85618f8e058c8255f26ee90 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 29 Nov 2023 12:10:41 +0200 Subject: [PATCH] Fix the tests --- crates/project/src/prettier_support.rs | 9 +++++++-- crates/project2/src/prettier_support.rs | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/crates/project/src/prettier_support.rs b/crates/project/src/prettier_support.rs index 063c4abcc4..1b0faff3e9 100644 --- a/crates/project/src/prettier_support.rs +++ b/crates/project/src/prettier_support.rs @@ -601,13 +601,18 @@ impl Project { pub fn install_default_prettier( &mut self, _worktree: Option, - _plugins: HashSet<&'static str>, + plugins: HashSet<&'static str>, _cx: &mut ModelContext, ) { // suppress unused code warnings - let _ = &self.default_prettier.installed_plugins; let _ = install_prettier_packages; let _ = save_prettier_server_file; + + self.default_prettier.installed_plugins.extend(plugins); + self.default_prettier.prettier = PrettierInstallation::Installed(PrettierInstance { + attempt: 0, + prettier: None, + }); } #[cfg(not(any(test, feature = "test-support")))] diff --git a/crates/project2/src/prettier_support.rs b/crates/project2/src/prettier_support.rs index 15f3028d85..e9ce8d9a06 100644 --- a/crates/project2/src/prettier_support.rs +++ b/crates/project2/src/prettier_support.rs @@ -615,13 +615,18 @@ impl Project { pub fn install_default_prettier( &mut self, _worktree: Option, - _plugins: HashSet<&'static str>, + plugins: HashSet<&'static str>, _cx: &mut ModelContext, ) { // suppress unused code warnings - let _ = &self.default_prettier.installed_plugins; let _ = install_prettier_packages; let _ = save_prettier_server_file; + + self.default_prettier.installed_plugins.extend(plugins); + self.default_prettier.prettier = PrettierInstallation::Installed(PrettierInstance { + attempt: 0, + prettier: None, + }); } #[cfg(not(any(test, feature = "test-support")))]