diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-03-13 20:22:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 20:22:02 +0000 |
commit | eca7b0cddd24074d6a3e255a45c0413f518a6303 (patch) | |
tree | b94dc4a4c99eb0e6d7d310d00410b9a7b930a56d | |
parent | bbc211906dcd5043af549250343cd7b42fb45043 (diff) |
chore(lsp): remove enablePaths compat path (#22895)
-rw-r--r-- | cli/lsp/config.rs | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index 120828a79..a3d8d2ad6 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<ModuleSpecifier, WorkspaceSettings>, - >, - ) { - 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<BTreeMap<ModuleSpecifier, WorkspaceSettings>>, ) { - 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 { |