add smart-paste plugin from the docs (#107)
Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
13
smart-paste.yazi/main.lua
Normal file
13
smart-paste.yazi/main.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
--- @sync entry
|
||||
return {
|
||||
entry = function()
|
||||
local h = cx.active.current.hovered
|
||||
if h and h.cha.is_dir then
|
||||
ya.mgr_emit("enter", {})
|
||||
ya.mgr_emit("paste", {})
|
||||
ya.mgr_emit("leave", {})
|
||||
else
|
||||
ya.mgr_emit("paste", {})
|
||||
end
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user