Skip to content

Commit

Permalink
chore: code clean-unused imports and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amyXia1994 committed Oct 13, 2023
1 parent 93eb9d7 commit b6975ed
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion kclvm/sema/src/resolver/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::ty::{
};
use indexmap::IndexMap;
use kclvm_ast::ast;
use kclvm_ast::walker::MutSelfTypedResultWalker;
use kclvm_ast_pretty::{print_ast_node, print_schema_expr, ASTNode};
use kclvm_error::*;

Expand Down
3 changes: 0 additions & 3 deletions kclvm/tools/src/LSP/src/find_refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ pub(crate) fn find_refs<F: Fn(String) -> Result<(), anyhow::Error>>(
cursor_path: String,
logger: F,
) -> anyhow::Result<Option<Vec<Location>>> {
// todo: decide the scope by the workspace root and the kcl.mod both, use the narrower scope
// todo: should use the current file path

let mut ref_locations = vec![];

for (_, word_index) in word_index_map {
Expand Down
1 change: 0 additions & 1 deletion kclvm/tools/src/LSP/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::main_loop::main_loop;
use config::Config;
use main_loop::app;
use std::collections::HashMap;

mod analysis;
mod capabilities;
Expand Down
17 changes: 0 additions & 17 deletions kclvm/tools/src/LSP/src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,6 @@ impl LanguageServerState {
word_index_add(value, new_word_index.clone());
}
}
// let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
// let url = lsp_types::Url::from_file_path(root.clone()).unwrap();
// let mm = self.word_index_map.get(&url).unwrap();
// println!("word_index_map: {:?}", mm);

// let file = from_lsp::file_path_from_url(&text_document.uri)?;
// let old_word_index = build_word_index_for_file_content(old_text, &text_document.uri);
// let new_word_index = build_word_index_for_file_content(text.clone(), &text_document.uri);

// let file_path = Path::new(&text_document.uri.path());
// for (key, mut value) in &self.word_index_map {
// let workspace_folder_path = Path::new(key.path());
// if file_path.starts_with(workspace_folder_path) {
// value = &word_index_subtract(value, old_word_index.clone());
// value = &word_index_add(value, new_word_index.clone());
// }
// }

Ok(())
}
Expand Down

0 comments on commit b6975ed

Please sign in to comment.