From 921224d86a5b857cd5baa54f854ce23c78df6111 Mon Sep 17 00:00:00 2001 From: he1pa <18012015693@163.com> Date: Tue, 16 Jul 2024 16:54:25 +0800 Subject: [PATCH] fix typo Signed-off-by: he1pa <18012015693@163.com> --- kclvm/tools/src/LSP/src/request.rs | 4 ++-- kclvm/tools/src/LSP/src/state.rs | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/kclvm/tools/src/LSP/src/request.rs b/kclvm/tools/src/LSP/src/request.rs index 6adba1489..ad4b83717 100644 --- a/kclvm/tools/src/LSP/src/request.rs +++ b/kclvm/tools/src/LSP/src/request.rs @@ -386,13 +386,13 @@ pub(crate) fn handle_rename( params: lsp_types::RenameParams, sender: Sender, ) -> anyhow::Result> { - // // 1. check the new name validity + // 1. check the new name validity let new_name = params.new_name; if !is_valid_kcl_name(new_name.as_str()) { return Err(anyhow!("Can not rename to: {new_name}, invalid name")); } - // // 2. find all the references of the symbol + // 2. find all the references of the symbol let file = file_path_from_url(¶ms.text_document_position.text_document.uri)?; let path = from_lsp::abs_path(¶ms.text_document_position.text_document.uri)?; if !snapshot.verify_request_path(&path.clone().into(), &sender) { diff --git a/kclvm/tools/src/LSP/src/state.rs b/kclvm/tools/src/LSP/src/state.rs index ef011a027..c4acb13b2 100644 --- a/kclvm/tools/src/LSP/src/state.rs +++ b/kclvm/tools/src/LSP/src/state.rs @@ -140,13 +140,6 @@ impl LanguageServerState { request_retry: Arc::new(RwLock::new(HashMap::new())), }; - // // let word_index_map = state.word_index_map.clone(); - // state.thread_pool.execute(move || { - // if let Err(err) = update_word_index_state(word_index_map, initialize_params, true) { - // log_message(err.to_string(), &task_sender); - // } - // }); - state }