From 6f077ebb07740446dba26ef2b3f9fb35fa0d9d1d Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sat, 26 Aug 2023 01:50:47 +0100 Subject: feat(lsp): update imports on file rename (#20245) Closes https://github.com/denoland/vscode_deno/issues/410. --- cli/lsp/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/lsp/config.rs') diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index 13bfdd75d..292f07e47 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -34,6 +34,7 @@ pub struct ClientCapabilities { pub testing_api: bool, pub workspace_configuration: bool, pub workspace_did_change_watched_files: bool, + pub workspace_will_rename_files: bool, } fn is_true() -> bool { @@ -664,6 +665,12 @@ impl Config { .did_change_watched_files .and_then(|it| it.dynamic_registration) .unwrap_or(false); + if let Some(file_operations) = &workspace.file_operations { + if let Some(true) = file_operations.dynamic_registration { + self.client_capabilities.workspace_will_rename_files = + file_operations.will_rename.unwrap_or(false); + } + } } if let Some(text_document) = &capabilities.text_document { -- cgit v1.2.3