Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: code clean-unused imports and comments #761

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Peefy marked this conversation as resolved.
Show resolved Hide resolved
Peefy marked this conversation as resolved.
Show resolved Hide resolved
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
Loading