Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa committed Jul 16, 2024
1 parent c992c89 commit 921224d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions kclvm/tools/src/LSP/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ pub(crate) fn handle_rename(
params: lsp_types::RenameParams,
sender: Sender<Task>,
) -> anyhow::Result<Option<lsp_types::WorkspaceEdit>> {
// // 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(&params.text_document_position.text_document.uri)?;
let path = from_lsp::abs_path(&params.text_document_position.text_document.uri)?;
if !snapshot.verify_request_path(&path.clone().into(), &sender) {
Expand Down
7 changes: 0 additions & 7 deletions kclvm/tools/src/LSP/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 921224d

Please sign in to comment.