From ac0968042ddb333de5e3c371cc79b3b4ef098356 Mon Sep 17 00:00:00 2001 From: Tom Li Dobnik Date: Fri, 20 Feb 2026 15:05:37 +0100 Subject: update --- .config/yazi/plugins/smart-enter.yazi/README.md | 8 ++++---- .config/yazi/plugins/smart-enter.yazi/main.lua | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to '.config/yazi/plugins/smart-enter.yazi') diff --git a/.config/yazi/plugins/smart-enter.yazi/README.md b/.config/yazi/plugins/smart-enter.yazi/README.md index d4c6bbd..742f2e1 100644 --- a/.config/yazi/plugins/smart-enter.yazi/README.md +++ b/.config/yazi/plugins/smart-enter.yazi/README.md @@ -5,7 +5,7 @@ ## Installation ```sh -ya pack -a yazi-rs/plugins:smart-enter +ya pkg add yazi-rs/plugins:smart-enter ``` ## Usage @@ -13,7 +13,7 @@ ya pack -a yazi-rs/plugins:smart-enter Bind your l key to the plugin, in your `~/.config/yazi/keymap.toml`: ```toml -[[manager.prepend_keymap]] +[[mgr.prepend_keymap]] on = "l" run = "plugin smart-enter" desc = "Enter the child directory, or open the file" @@ -36,5 +36,5 @@ require("smart-enter"):setup { This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. -[open]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.open -[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.enter +[open]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.open +[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.enter diff --git a/.config/yazi/plugins/smart-enter.yazi/main.lua b/.config/yazi/plugins/smart-enter.yazi/main.lua index 37a465a..e9e2ec6 100644 --- a/.config/yazi/plugins/smart-enter.yazi/main.lua +++ b/.config/yazi/plugins/smart-enter.yazi/main.lua @@ -1,10 +1,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.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi }) + ya.emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi }) end return { entry = entry, setup = setup } -- cgit v1.2.3