summaryrefslogtreecommitdiff
path: root/fedora/.config/yazi/plugins/smart-enter.yazi/main.lua
blob: e9e2ec649d1e89f2bbe11ca0884a802d69b56b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
--- @since 25.5.31
--- @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.emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi })
end

return { entry = entry, setup = setup }