theniceboy/yazi/plugins/smart-enter.yazi/init.lua
2024-12-15 14:23:03 -08:00

10 lines
292 B
Lua

--- @sync entry
local function setup(self, opts) self.open_multi = opts.open_multi end
local function entry(self)
local h = cx.active.current.hovered
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi })
end
return { entry = entry, setup = setup }