mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
e40e443cc1
commit
c5f53bf74c
3 changed files with 17 additions and 19 deletions
|
|
@ -12,7 +12,7 @@ pub fn slim_lua() -> mlua::Result<Lua> {
|
||||||
|
|
||||||
crate::fs::install(&lua)?;
|
crate::fs::install(&lua)?;
|
||||||
crate::process::install(&lua)?;
|
crate::process::install(&lua)?;
|
||||||
crate::utils::Utils::install(&lua)?;
|
crate::utils::install(&lua)?;
|
||||||
crate::Config::new(&lua).install_preview()?;
|
crate::Config::new(&lua).install_preview()?;
|
||||||
|
|
||||||
// Elements
|
// Elements
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ pub fn init() {
|
||||||
crate::Loader::init();
|
crate::Loader::init();
|
||||||
crate::Config::new(lua).install_boot()?.install_manager()?.install_theme()?;
|
crate::Config::new(lua).install_boot()?.install_manager()?.install_theme()?;
|
||||||
crate::utils::init();
|
crate::utils::init();
|
||||||
crate::utils::pour(lua)?;
|
crate::utils::install(lua)?;
|
||||||
|
|
||||||
// Base
|
// Base
|
||||||
lua.load(include_str!("../preset/inspect/inspect.lua")).exec()?;
|
lua.load(include_str!("../preset/inspect/inspect.lua")).exec()?;
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@ pub(super) static USERS_CACHE: yazi_shared::RoCell<uzers::UsersCache> = yazi_sha
|
||||||
|
|
||||||
pub(super) static HOSTNAME_CACHE: std::sync::OnceLock<Option<String>> = std::sync::OnceLock::new();
|
pub(super) static HOSTNAME_CACHE: std::sync::OnceLock<Option<String>> = std::sync::OnceLock::new();
|
||||||
|
|
||||||
pub struct Utils;
|
pub(super) struct Utils;
|
||||||
|
|
||||||
impl Utils {
|
|
||||||
pub fn install(lua: &mlua::Lua) -> mlua::Result<()> {
|
pub fn install(lua: &mlua::Lua) -> mlua::Result<()> {
|
||||||
let ya: mlua::Table = lua.create_table()?;
|
let ya: mlua::Table = lua.create_table()?;
|
||||||
|
|
||||||
|
|
@ -23,7 +22,6 @@ impl Utils {
|
||||||
|
|
||||||
lua.globals().set("ya", ya)
|
lua.globals().set("ya", ya)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue