diff --git a/yazi-adaptor/src/adaptor.rs b/yazi-adaptor/src/adaptor.rs index 2eac27ac..73e4aff3 100644 --- a/yazi-adaptor/src/adaptor.rs +++ b/yazi-adaptor/src/adaptor.rs @@ -1,9 +1,9 @@ use std::{env, path::{Path, PathBuf}, sync::atomic::{AtomicBool, Ordering}}; use anyhow::{anyhow, Result}; -use yazi_config::PREVIEW; use ratatui::prelude::Rect; use tokio::{fs, sync::mpsc::UnboundedSender}; +use yazi_config::PREVIEW; use yazi_shared::RoCell; use super::{Iterm2, Kitty}; diff --git a/yazi-adaptor/src/image.rs b/yazi-adaptor/src/image.rs index 7ac7a87f..1052f21e 100644 --- a/yazi-adaptor/src/image.rs +++ b/yazi-adaptor/src/image.rs @@ -1,9 +1,9 @@ use std::{path::Path, sync::Arc}; use anyhow::Result; -use yazi_config::PREVIEW; use image::{imageops::FilterType, DynamicImage, ImageFormat}; use tokio::fs; +use yazi_config::PREVIEW; use yazi_shared::Term; pub struct Image; diff --git a/yazi-core/Cargo.toml b/yazi-core/Cargo.toml index 5c3b1db9..f939a44f 100644 --- a/yazi-core/Cargo.toml +++ b/yazi-core/Cargo.toml @@ -34,7 +34,7 @@ unicode-width = "^0" yazi-prebuild = "^0" # Logging -tracing = "^0" +tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] } [target."cfg(windows)".dependencies] clipboard-win = "^4" diff --git a/yazi-core/src/context.rs b/yazi-core/src/context.rs index 768258be..86c22800 100644 --- a/yazi-core/src/context.rs +++ b/yazi-core/src/context.rs @@ -1,6 +1,6 @@ -use yazi_config::keymap::KeymapLayer; use crossterm::terminal::WindowSize; use ratatui::prelude::Rect; +use yazi_config::keymap::KeymapLayer; use yazi_shared::Term; use crate::{help::Help, input::Input, manager::Manager, select::Select, tasks::Tasks, which::Which, Position}; diff --git a/yazi-core/src/event.rs b/yazi-core/src/event.rs index 5a7bd3bb..d09f30f0 100644 --- a/yazi-core/src/event.rs +++ b/yazi-core/src/event.rs @@ -1,9 +1,9 @@ use std::{collections::BTreeMap, ffi::OsString}; use anyhow::Result; -use yazi_config::{keymap::{Exec, KeymapLayer}, open::Opener}; use crossterm::event::KeyEvent; use tokio::sync::{mpsc::{self, UnboundedSender}, oneshot}; +use yazi_config::{keymap::{Exec, KeymapLayer}, open::Opener}; use yazi_shared::{InputError, RoCell, Url}; use super::{files::FilesOp, input::InputOpt, select::SelectOpt}; diff --git a/yazi-core/src/external/ffmpegthumbnailer.rs b/yazi-core/src/external/ffmpegthumbnailer.rs index b1755ac3..baec3315 100644 --- a/yazi-core/src/external/ffmpegthumbnailer.rs +++ b/yazi-core/src/external/ffmpegthumbnailer.rs @@ -1,7 +1,7 @@ use std::path::Path; -use yazi_config::PREVIEW; use tokio::process::Command; +use yazi_config::PREVIEW; use yazi_shared::PeekError; pub async fn ffmpegthumbnailer(src: &Path, dest: &Path, skip: usize) -> Result<(), PeekError> { diff --git a/yazi-core/src/external/jq.rs b/yazi-core/src/external/jq.rs index d37229e1..16fe788e 100644 --- a/yazi-core/src/external/jq.rs +++ b/yazi-core/src/external/jq.rs @@ -1,9 +1,9 @@ use std::{path::Path, process::Stdio}; use anyhow::Result; +use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command}; use yazi_config::PREVIEW; use yazi_shared::PeekError; -use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command}; pub async fn jq(path: &Path, skip: usize, limit: usize) -> Result { let mut child = Command::new("jq") diff --git a/yazi-core/src/external/lsar.rs b/yazi-core/src/external/lsar.rs index 19362fc5..d48a0f88 100644 --- a/yazi-core/src/external/lsar.rs +++ b/yazi-core/src/external/lsar.rs @@ -3,8 +3,8 @@ use std::path::Path; use anyhow::anyhow; use serde::Deserialize; use serde_json::Value; -use yazi_shared::PeekError; use tokio::process::Command; +use yazi_shared::PeekError; #[derive(Debug)] pub enum LsarAttr { diff --git a/yazi-core/src/external/pdftoppm.rs b/yazi-core/src/external/pdftoppm.rs index ba71c45e..3f9c4c1d 100644 --- a/yazi-core/src/external/pdftoppm.rs +++ b/yazi-core/src/external/pdftoppm.rs @@ -1,9 +1,9 @@ use std::{path::Path, sync::Arc}; -use yazi_adaptor::Image; use regex::Regex; -use yazi_shared::PeekError; use tokio::process::Command; +use yazi_adaptor::Image; +use yazi_shared::PeekError; pub async fn pdftoppm(src: &Path, dest: impl AsRef, skip: usize) -> Result<(), PeekError> { let output = Command::new("pdftoppm") diff --git a/yazi-core/src/external/rg.rs b/yazi-core/src/external/rg.rs index 96beb5ea..9220c5b0 100644 --- a/yazi-core/src/external/rg.rs +++ b/yazi-core/src/external/rg.rs @@ -1,8 +1,8 @@ use std::process::Stdio; use anyhow::Result; -use yazi_shared::Url; use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command, sync::mpsc::{self, UnboundedReceiver}}; +use yazi_shared::Url; use crate::files::File; diff --git a/yazi-core/src/external/zoxide.rs b/yazi-core/src/external/zoxide.rs index 75e8f5d8..f15ed57c 100644 --- a/yazi-core/src/external/zoxide.rs +++ b/yazi-core/src/external/zoxide.rs @@ -1,8 +1,8 @@ use std::process::Stdio; use anyhow::Result; -use yazi_shared::Url; use tokio::{process::Command, sync::oneshot::{self, Receiver}}; +use yazi_shared::Url; pub struct ZoxideOpt { pub cwd: Url, diff --git a/yazi-core/src/files/file.rs b/yazi-core/src/files/file.rs index 3e5047c7..c136a04a 100644 --- a/yazi-core/src/files/file.rs +++ b/yazi-core/src/files/file.rs @@ -1,8 +1,8 @@ use std::{borrow::Cow, collections::BTreeMap, ffi::OsStr, fs::Metadata}; use anyhow::Result; -use yazi_shared::Url; use tokio::fs; +use yazi_shared::Url; #[derive(Clone, Debug)] pub struct File { diff --git a/yazi-core/src/files/files.rs b/yazi-core/src/files/files.rs index 0fe03e43..d1966643 100644 --- a/yazi-core/src/files/files.rs +++ b/yazi-core/src/files/files.rs @@ -1,9 +1,9 @@ use std::{collections::{BTreeMap, BTreeSet}, mem, ops::Deref, sync::atomic::Ordering}; use anyhow::Result; +use tokio::{fs, select, sync::mpsc::{self, UnboundedReceiver}}; use yazi_config::{manager::SortBy, MANAGER}; use yazi_shared::Url; -use tokio::{fs, select, sync::mpsc::{self, UnboundedReceiver}}; use super::{File, FilesSorter, FILES_TICKET}; diff --git a/yazi-core/src/help/help.rs b/yazi-core/src/help/help.rs index 1ac1299a..a43d3481 100644 --- a/yazi-core/src/help/help.rs +++ b/yazi-core/src/help/help.rs @@ -1,6 +1,6 @@ +use unicode_width::UnicodeWidthStr; use yazi_config::{keymap::{Control, Key, KeymapLayer}, KEYMAP}; use yazi_shared::Term; -use unicode_width::UnicodeWidthStr; use super::HELP_MARGIN; use crate::{emit, input::Input}; diff --git a/yazi-core/src/highlighter.rs b/yazi-core/src/highlighter.rs index 3e5d6db5..bd289b6b 100644 --- a/yazi-core/src/highlighter.rs +++ b/yazi-core/src/highlighter.rs @@ -1,8 +1,8 @@ use std::{fs::File, io::BufReader, sync::OnceLock}; use anyhow::Result; -use yazi_config::THEME; use syntect::{dumps::from_uncompressed_data, highlighting::{Theme, ThemeSet}, parsing::SyntaxSet}; +use yazi_config::THEME; static SYNTECT_SYNTAX: OnceLock = OnceLock::new(); static SYNTECT_THEME: OnceLock = OnceLock::new(); diff --git a/yazi-core/src/input/input.rs b/yazi-core/src/input/input.rs index 6efccf1c..649218a2 100644 --- a/yazi-core/src/input/input.rs +++ b/yazi-core/src/input/input.rs @@ -1,10 +1,10 @@ use std::ops::Range; -use yazi_config::keymap::Key; use crossterm::event::KeyCode; -use yazi_shared::{CharKind, InputError}; use tokio::sync::mpsc::UnboundedSender; use unicode_width::UnicodeWidthStr; +use yazi_config::keymap::Key; +use yazi_shared::{CharKind, InputError}; use super::{mode::InputMode, op::InputOp, InputOpt, InputSnap, InputSnaps}; use crate::{external, Position}; diff --git a/yazi-core/src/manager/commands/create.rs b/yazi-core/src/manager/commands/create.rs index 275455b6..cb24e53b 100644 --- a/yazi-core/src/manager/commands/create.rs +++ b/yazi-core/src/manager/commands/create.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; -use yazi_shared::Url; use tokio::fs::{self}; +use yazi_shared::Url; use crate::{emit, files::{File, FilesOp}, input::InputOpt, manager::Manager}; diff --git a/yazi-core/src/manager/commands/rename.rs b/yazi-core/src/manager/commands/rename.rs index 8867bfb9..6071dd28 100644 --- a/yazi-core/src/manager/commands/rename.rs +++ b/yazi-core/src/manager/commands/rename.rs @@ -1,9 +1,9 @@ use std::{collections::BTreeSet, ffi::OsStr, io::{stdout, BufWriter, Write}, path::PathBuf}; use anyhow::{anyhow, bail, Result}; +use tokio::{fs::{self, OpenOptions}, io::{stdin, AsyncReadExt, AsyncWriteExt}}; use yazi_config::{OPEN, PREVIEW}; use yazi_shared::{max_common_root, Defer, Term, Url}; -use tokio::{fs::{self, OpenOptions}, io::{stdin, AsyncReadExt, AsyncWriteExt}}; use crate::{emit, external::{self, ShellOpt}, files::{File, FilesOp}, input::InputOpt, manager::Manager, Event, BLOCKER}; diff --git a/yazi-core/src/manager/watcher.rs b/yazi-core/src/manager/watcher.rs index b1671fb8..f759b566 100644 --- a/yazi-core/src/manager/watcher.rs +++ b/yazi-core/src/manager/watcher.rs @@ -3,9 +3,9 @@ use std::{collections::BTreeSet, sync::Arc, time::Duration}; use indexmap::IndexMap; use notify::{event::{MetadataKind, ModifyKind}, EventKind, RecommendedWatcher, RecursiveMode, Watcher as _Watcher}; use parking_lot::RwLock; -use yazi_shared::Url; use tokio::{fs, pin, sync::mpsc::{self, UnboundedReceiver}}; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; +use yazi_shared::Url; use crate::{emit, external, files::{File, Files, FilesOp}}; diff --git a/yazi-core/src/preview/preview.rs b/yazi-core/src/preview/preview.rs index 5b94a6c8..ae2f5412 100644 --- a/yazi-core/src/preview/preview.rs +++ b/yazi-core/src/preview/preview.rs @@ -1,10 +1,10 @@ use std::{sync::atomic::Ordering, time::Duration}; +use tokio::{pin, task::JoinHandle}; +use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; use yazi_adaptor::ADAPTOR; use yazi_config::MANAGER; use yazi_shared::{MimeKind, PeekError, Url, MIME_DIR}; -use tokio::{pin, task::JoinHandle}; -use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; use super::{Provider, INCR}; use crate::{emit, files::{Files, FilesOp}}; diff --git a/yazi-core/src/preview/provider.rs b/yazi-core/src/preview/provider.rs index e024bc7c..13d0ed32 100644 --- a/yazi-core/src/preview/provider.rs +++ b/yazi-core/src/preview/provider.rs @@ -1,12 +1,12 @@ use std::{io::BufRead, path::Path, sync::atomic::{AtomicUsize, Ordering}}; -use yazi_adaptor::ADAPTOR; use anyhow::anyhow; -use yazi_config::{MANAGER, PREVIEW}; use futures::TryFutureExt; -use yazi_shared::{MimeKind, PeekError}; use syntect::{easy::HighlightFile, util::as_24_bit_terminal_escaped}; use tokio::fs; +use yazi_adaptor::ADAPTOR; +use yazi_config::{MANAGER, PREVIEW}; +use yazi_shared::{MimeKind, PeekError}; use super::PreviewData; use crate::{external, highlighter}; diff --git a/yazi-core/src/tab/commands/find.rs b/yazi-core/src/tab/commands/find.rs index d197ff36..4e2937ab 100644 --- a/yazi-core/src/tab/commands/find.rs +++ b/yazi-core/src/tab/commands/find.rs @@ -1,9 +1,9 @@ use std::time::Duration; -use yazi_config::keymap::{Exec, KeymapLayer}; -use yazi_shared::{Debounce, InputError}; use tokio::pin; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; +use yazi_config::keymap::{Exec, KeymapLayer}; +use yazi_shared::{Debounce, InputError}; use crate::{emit, input::InputOpt, tab::{Finder, FinderCase, Tab}}; diff --git a/yazi-core/src/tab/folder.rs b/yazi-core/src/tab/folder.rs index 6d7a061e..57120453 100644 --- a/yazi-core/src/tab/folder.rs +++ b/yazi-core/src/tab/folder.rs @@ -1,5 +1,5 @@ -use yazi_config::MANAGER; use ratatui::layout::Rect; +use yazi_config::MANAGER; use yazi_shared::Url; use crate::{emit, files::{File, Files, FilesOp}, Step}; diff --git a/yazi-core/src/tasks/scheduler.rs b/yazi-core/src/tasks/scheduler.rs index c1ba7833..f5499136 100644 --- a/yazi-core/src/tasks/scheduler.rs +++ b/yazi-core/src/tasks/scheduler.rs @@ -1,10 +1,10 @@ use std::{ffi::OsStr, sync::Arc, time::Duration}; -use yazi_config::{open::Opener, TASKS}; use futures::{future::BoxFuture, FutureExt}; use parking_lot::RwLock; -use yazi_shared::{unique_path, Throttle, Url}; use tokio::{fs, select, sync::{mpsc::{self, UnboundedReceiver}, oneshot}, time::sleep}; +use yazi_config::{open::Opener, TASKS}; +use yazi_shared::{unique_path, Throttle, Url}; use super::{workers::{File, FileOpDelete, FileOpLink, FileOpPaste, FileOpTrash, Precache, PrecacheOpMime, PrecacheOpSize, Process, ProcessOpOpen}, Running, TaskOp, TaskStage, TasksProgress}; use crate::emit; diff --git a/yazi-core/src/tasks/tasks.rs b/yazi-core/src/tasks/tasks.rs index 43d42c22..bd6d8ad9 100644 --- a/yazi-core/src/tasks/tasks.rs +++ b/yazi-core/src/tasks/tasks.rs @@ -1,11 +1,11 @@ use std::{collections::{BTreeMap, HashMap, HashSet}, ffi::OsStr, io::{stdout, Write}, path::Path, sync::Arc}; -use yazi_config::{manager::SortBy, open::Opener, OPEN}; use crossterm::terminal::{disable_raw_mode, enable_raw_mode}; use serde::Serialize; -use yazi_shared::{Defer, MimeKind, Term, Url}; use tokio::{io::{stdin, AsyncReadExt}, select, sync::mpsc, time}; -use tracing::trace; +use tracing::debug; +use yazi_config::{manager::SortBy, open::Opener, OPEN}; +use yazi_shared::{Defer, MimeKind, Term, Url}; use super::{running::Running, task::TaskSummary, Scheduler, TASKS_PADDING, TASKS_PERCENT}; use crate::{emit, files::{File, Files}, input::InputOpt, Event, BLOCKER}; @@ -160,7 +160,7 @@ impl Tasks { for u in src { let to = dest.join(u.file_name().unwrap()); if force && u == &to { - trace!("file_cut: same file, skipping {:?}", to); + debug!("file_cut: same file, skipping {:?}", to); } else { self.scheduler.file_cut(u.clone(), to, force); } @@ -172,7 +172,7 @@ impl Tasks { for u in src { let to = dest.join(u.file_name().unwrap()); if force && u == &to { - trace!("file_copy: same file, skipping {:?}", to); + debug!("file_copy: same file, skipping {:?}", to); } else { self.scheduler.file_copy(u.clone(), to, force); } @@ -184,7 +184,7 @@ impl Tasks { for u in src { let to = dest.join(u.file_name().unwrap()); if force && *u == to { - trace!("file_link: same file, skipping {:?}", to); + debug!("file_link: same file, skipping {:?}", to); } else { self.scheduler.file_link(u.clone(), to, relative, force); } diff --git a/yazi-core/src/tasks/workers/file.rs b/yazi-core/src/tasks/workers/file.rs index 4f545a1e..8239d967 100644 --- a/yazi-core/src/tasks/workers/file.rs +++ b/yazi-core/src/tasks/workers/file.rs @@ -1,11 +1,11 @@ use std::{borrow::Cow, collections::VecDeque, fs::Metadata, path::{Path, PathBuf}}; use anyhow::Result; -use yazi_config::TASKS; use futures::{future::BoxFuture, FutureExt}; -use yazi_shared::{calculate_size, copy_with_progress, path_relative_to, Url}; use tokio::{fs, io::{self, ErrorKind::{AlreadyExists, NotFound}}, sync::mpsc}; -use tracing::trace; +use tracing::warn; +use yazi_config::TASKS; +use yazi_shared::{calculate_size, copy_with_progress, path_relative_to, Url}; use crate::tasks::TaskOp; @@ -94,7 +94,7 @@ impl File { } Ok(n) => self.sch.send(TaskOp::Adv(task.id, 0, n))?, Err(e) if e.kind() == NotFound => { - trace!("Paste task partially done: {:?}", task); + warn!("Paste task partially done: {:?}", task); break; } // Operation not permitted (os error 1) diff --git a/yazi-core/src/tasks/workers/precache.rs b/yazi-core/src/tasks/workers/precache.rs index 35fcc264..cf3337aa 100644 --- a/yazi-core/src/tasks/workers/precache.rs +++ b/yazi-core/src/tasks/workers/precache.rs @@ -1,11 +1,11 @@ use std::{collections::{BTreeMap, BTreeSet}, sync::Arc}; -use yazi_adaptor::Image; use anyhow::Result; -use yazi_config::PREVIEW; use parking_lot::Mutex; -use yazi_shared::{calculate_size, Throttle, Url}; use tokio::{fs, sync::mpsc}; +use yazi_adaptor::Image; +use yazi_config::PREVIEW; +use yazi_shared::{calculate_size, Throttle, Url}; use crate::{emit, external, files::FilesOp, tasks::TaskOp}; diff --git a/yazi-fm/Cargo.toml b/yazi-fm/Cargo.toml index 567581a4..9bd1b367 100644 --- a/yazi-fm/Cargo.toml +++ b/yazi-fm/Cargo.toml @@ -25,7 +25,7 @@ tokio = { version = "^1", features = [ "parking_lot" ] } unicode-width = "^0" # Logging -tracing = "^0" +tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] } tracing-appender = "^0" tracing-subscriber = "^0" diff --git a/yazi-fm/src/executor.rs b/yazi-fm/src/executor.rs index d3364f10..2139fecc 100644 --- a/yazi-fm/src/executor.rs +++ b/yazi-fm/src/executor.rs @@ -1,6 +1,5 @@ -use yazi_core::{emit, input::InputMode, tab::FinderCase, Ctx}; - use yazi_config::{keymap::{Control, Exec, Key, KeymapLayer}, KEYMAP}; +use yazi_core::{emit, input::InputMode, tab::FinderCase, Ctx}; use yazi_shared::{optional_bool, Url}; pub(super) struct Executor; diff --git a/yazi-fm/src/help/bindings.rs b/yazi-fm/src/help/bindings.rs index d3514cd6..d990c143 100644 --- a/yazi-fm/src/help/bindings.rs +++ b/yazi-fm/src/help/bindings.rs @@ -1,7 +1,6 @@ -use yazi_core::Ctx; - -use yazi_config::THEME; use ratatui::{layout::{self, Constraint}, prelude::{Buffer, Direction, Rect}, widgets::{List, ListItem, Widget}}; +use yazi_config::THEME; +use yazi_core::Ctx; pub(super) struct Bindings<'a> { cx: &'a Ctx, diff --git a/yazi-fm/src/help/layout.rs b/yazi-fm/src/help/layout.rs index 81362b76..b290e509 100644 --- a/yazi-fm/src/help/layout.rs +++ b/yazi-fm/src/help/layout.rs @@ -1,7 +1,6 @@ -use yazi_core::Ctx; - -use yazi_config::THEME; use ratatui::{buffer::Buffer, layout::{self, Rect}, prelude::{Constraint, Direction}, widgets::{Clear, Paragraph, Widget}}; +use yazi_config::THEME; +use yazi_core::Ctx; use super::Bindings; diff --git a/yazi-fm/src/input/input.rs b/yazi-fm/src/input/input.rs index 6b65a3e6..0aab7ea0 100644 --- a/yazi-fm/src/input/input.rs +++ b/yazi-fm/src/input/input.rs @@ -1,9 +1,9 @@ -use yazi_core::{input::InputMode, Ctx}; use std::ops::Range; use ansi_to_tui::IntoText; -use yazi_config::THEME; use ratatui::{buffer::Buffer, layout::Rect, text::{Line, Text}, widgets::{Block, BorderType, Borders, Clear, Paragraph, Widget}}; +use yazi_config::THEME; +use yazi_core::{input::InputMode, Ctx}; use yazi_shared::Term; pub(crate) struct Input<'a> { diff --git a/yazi-fm/src/logs.rs b/yazi-fm/src/logs.rs index 5a76637c..6587e31c 100644 --- a/yazi-fm/src/logs.rs +++ b/yazi-fm/src/logs.rs @@ -1,7 +1,7 @@ use anyhow::{Context, Result}; -use yazi_config::BOOT; use tracing_appender::non_blocking::WorkerGuard; use tracing_subscriber::{fmt, prelude::__tracing_subscriber_SubscriberExt, Registry}; +use yazi_config::BOOT; pub(super) struct Logs; diff --git a/yazi-fm/src/select/select.rs b/yazi-fm/src/select/select.rs index 46017cad..0fd3a43f 100644 --- a/yazi-fm/src/select/select.rs +++ b/yazi-fm/src/select/select.rs @@ -1,7 +1,6 @@ -use yazi_core::Ctx; - -use yazi_config::THEME; use ratatui::{buffer::Buffer, layout::Rect, widgets::{Block, BorderType, Borders, Clear, List, ListItem, Widget}}; +use yazi_config::THEME; +use yazi_core::Ctx; pub(crate) struct Select<'a> { cx: &'a Ctx, diff --git a/yazi-fm/src/signals.rs b/yazi-fm/src/signals.rs index f7f25639..ea98c2a1 100644 --- a/yazi-fm/src/signals.rs +++ b/yazi-fm/src/signals.rs @@ -1,9 +1,8 @@ -use yazi_core::Event; - use anyhow::Result; use crossterm::event::{Event as CrosstermEvent, EventStream, KeyEvent, KeyEventKind}; use futures::StreamExt; use tokio::{select, sync::{mpsc::{self, UnboundedReceiver, UnboundedSender}, oneshot}, task::JoinHandle}; +use yazi_core::Event; pub(super) struct Signals { tx: UnboundedSender, diff --git a/yazi-fm/src/tasks/layout.rs b/yazi-fm/src/tasks/layout.rs index 0c071df2..362a3fdb 100644 --- a/yazi-fm/src/tasks/layout.rs +++ b/yazi-fm/src/tasks/layout.rs @@ -1,7 +1,6 @@ -use yazi_core::{tasks::TASKS_PERCENT, Ctx}; - -use yazi_config::THEME; use ratatui::{buffer::Buffer, layout::{self, Alignment, Constraint, Direction, Rect}, text::Line, widgets::{Block, BorderType, Borders, List, ListItem, Padding, Widget}}; +use yazi_config::THEME; +use yazi_core::{tasks::TASKS_PERCENT, Ctx}; use super::Clear; diff --git a/yazi-fm/src/which/layout.rs b/yazi-fm/src/which/layout.rs index f86746ca..d4d2456b 100644 --- a/yazi-fm/src/which/layout.rs +++ b/yazi-fm/src/which/layout.rs @@ -1,7 +1,6 @@ -use yazi_core::Ctx; - -use yazi_config::THEME; use ratatui::{layout, prelude::{Buffer, Constraint, Direction, Rect}, widgets::{Block, Clear, Widget}}; +use yazi_config::THEME; +use yazi_core::Ctx; use super::Side; diff --git a/yazi-fm/src/which/side.rs b/yazi-fm/src/which/side.rs index b86097e1..bb04cfd5 100644 --- a/yazi-fm/src/which/side.rs +++ b/yazi-fm/src/which/side.rs @@ -1,5 +1,5 @@ -use yazi_config::{keymap::Control, THEME}; use ratatui::{prelude::{Buffer, Rect}, text::{Line, Span}, widgets::{Block, List, ListItem, Padding, Widget}}; +use yazi_config::{keymap::Control, THEME}; pub(super) struct Side<'a> { times: usize, diff --git a/yazi-plugin/Cargo.toml b/yazi-plugin/Cargo.toml index 32acf169..c3c5f55e 100644 --- a/yazi-plugin/Cargo.toml +++ b/yazi-plugin/Cargo.toml @@ -18,5 +18,5 @@ ansi-to-tui = "^3" anyhow = "^1" mlua = { version = "^0", features = [ "luajit52", "vendored", "serialize" ] } ratatui = "^0" -tracing = "^0" +tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] } unicode-width = "^0" diff --git a/yazi-plugin/src/components/preview.rs b/yazi-plugin/src/components/preview.rs index 20af33ed..546f911b 100644 --- a/yazi-plugin/src/components/preview.rs +++ b/yazi-plugin/src/components/preview.rs @@ -1,7 +1,6 @@ -use yazi_core::{preview::PreviewData, Ctx}; - use ansi_to_tui::IntoText; use ratatui::{buffer::Buffer, layout::Rect, widgets::{Paragraph, Widget}}; +use yazi_core::{preview::PreviewData, Ctx}; use super::Folder; diff --git a/yazi-plugin/src/layout/span.rs b/yazi-plugin/src/layout/span.rs index b96c6da3..971ce06c 100644 --- a/yazi-plugin/src/layout/span.rs +++ b/yazi-plugin/src/layout/span.rs @@ -1,5 +1,5 @@ -use yazi_config::theme::Color; use mlua::{AnyUserData, FromLua, Lua, Table, UserData, UserDataMethods, Value}; +use yazi_config::theme::Color; use super::Style; use crate::{GLOBALS, LUA}; diff --git a/yazi-plugin/src/plugin.rs b/yazi-plugin/src/plugin.rs index 6dca0aa5..cc9067a3 100644 --- a/yazi-plugin/src/plugin.rs +++ b/yazi-plugin/src/plugin.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use yazi_config::PLUGINS; use mlua::{Lua, Table}; +use yazi_config::PLUGINS; use yazi_shared::RoCell; use crate::{bindings, components, layout, utils}; diff --git a/yazi-plugin/src/scope.rs b/yazi-plugin/src/scope.rs index 190dae27..012b3c58 100644 --- a/yazi-plugin/src/scope.rs +++ b/yazi-plugin/src/scope.rs @@ -1,6 +1,5 @@ -use yazi_core::Ctx; - pub use mlua::Scope; +use yazi_core::Ctx; use crate::{bindings, GLOBALS, LUA};