mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-24 05:05:00 +00:00
dev: clean up log to print (#818)
This commit is contained in:
parent
dd2a22a67d
commit
b844240212
6 changed files with 10 additions and 12 deletions
|
@ -1121,6 +1121,7 @@ impl AnalysisRevCache {
|
|||
) -> Arc<RevisionSlot<AnalysisRevSlot>> {
|
||||
lg.inner.access(revision);
|
||||
self.manager.find_revision(revision, |slot_base| {
|
||||
log::info!("analysis revision {} is created", revision.get());
|
||||
slot_base
|
||||
.map(|e| AnalysisRevSlot {
|
||||
revision: e.revision,
|
||||
|
@ -1162,7 +1163,7 @@ struct AnalysisRevSlot {
|
|||
|
||||
impl Drop for AnalysisRevSlot {
|
||||
fn drop(&mut self) {
|
||||
log::info!("analysis revision {} is dropped", self.revision)
|
||||
log::info!("analysis revision {} is dropped", self.revision);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ use std::ops::{Deref, Range};
|
|||
|
||||
use anyhow::anyhow;
|
||||
use ecow::{eco_vec, EcoString, EcoVec};
|
||||
use log::info;
|
||||
use lsp_types::SymbolKind;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typst::syntax::{
|
||||
|
@ -42,8 +41,7 @@ pub(crate) fn get_lexical_hierarchy(
|
|||
worker.symbreak();
|
||||
}
|
||||
|
||||
let e = std::time::Instant::now();
|
||||
info!("lexical hierarchy analysis took {:?}", e - b);
|
||||
log::debug!("lexical hierarchy analysis took {:?}", b.elapsed());
|
||||
res.map(|_| worker.stack.pop().unwrap().1)
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ pub fn autocomplete(
|
|||
) -> Option<(usize, bool, Vec<Completion>, Vec<lsp_types::CompletionItem>)> {
|
||||
let _ = complete_comments(&mut ctx)
|
||||
|| complete_type(&mut ctx).is_none() && {
|
||||
log::info!("continue after completing type");
|
||||
log::debug!("continue after completing type");
|
||||
complete_labels(&mut ctx)
|
||||
|| complete_field_accesses(&mut ctx)
|
||||
|| complete_imports(&mut ctx)
|
||||
|
|
|
@ -55,7 +55,7 @@ pub fn plain_docs_sentence(docs: &str) -> EcoString {
|
|||
let link_content = s.from(c + 1);
|
||||
s.eat();
|
||||
|
||||
log::info!("Intra Link: {link_content}");
|
||||
log::debug!("Intra Link: {link_content}");
|
||||
let link = resolve(link_content, "https://typst.app/docs/").ok();
|
||||
let link = link.unwrap_or_else(|| {
|
||||
log::warn!("Failed to resolve link: {link_content}");
|
||||
|
|
|
@ -22,8 +22,6 @@ impl SemanticRequest for WorkspaceLabelRequest {
|
|||
let mut symbols = vec![];
|
||||
|
||||
for id in ctx.source_files().clone() {
|
||||
let now = reflexo::time::Instant::now();
|
||||
log::info!("workspace/label: {:?}", id);
|
||||
let Ok(source) = ctx.source_by_id(id) else {
|
||||
continue;
|
||||
};
|
||||
|
@ -39,7 +37,6 @@ impl SemanticRequest for WorkspaceLabelRequest {
|
|||
if let Some(mut res) = res {
|
||||
symbols.append(&mut res)
|
||||
}
|
||||
log::info!("workspace/label: {:?} took {:?}", id, now.elapsed());
|
||||
}
|
||||
|
||||
Some(symbols)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue