From eca7b0cddd24074d6a3e255a45c0413f518a6303 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Wed, 13 Mar 2024 20:22:02 +0000 Subject: [PATCH] chore(lsp): remove enablePaths compat path (#22895) --- cli/lsp/config.rs | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index 120828a798..a3d8d2ad62 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -786,31 +786,6 @@ impl Settings { } (&self.unscoped, None) } - - pub fn set_unscoped(&mut self, mut settings: WorkspaceSettings) { - // See https://github.com/denoland/vscode_deno/issues/908. - if settings.enable_paths == Some(vec![]) { - settings.enable_paths = None; - } - self.unscoped = settings; - } - - pub fn set_for_workspace_folders( - &mut self, - mut by_workspace_folder: Option< - BTreeMap, - >, - ) { - if let Some(by_workspace_folder) = &mut by_workspace_folder { - for settings in by_workspace_folder.values_mut() { - // See https://github.com/denoland/vscode_deno/issues/908. - if settings.enable_paths == Some(vec![]) { - settings.enable_paths = None; - } - } - } - self.by_workspace_folder = by_workspace_folder; - } } #[derive(Debug)] @@ -871,8 +846,10 @@ impl Config { unscoped: WorkspaceSettings, by_workspace_folder: Option>, ) { - self.settings.set_unscoped(unscoped); - self.settings.set_for_workspace_folders(by_workspace_folder); + self.settings = Settings { + unscoped, + by_workspace_folder, + }; } pub fn workspace_settings(&self) -> &WorkspaceSettings {