diff options
Diffstat (limited to '.config/yazi/plugins/smart-enter.yazi')
| -rw-r--r-- | .config/yazi/plugins/smart-enter.yazi/README.md | 8 | ||||
| -rw-r--r-- | .config/yazi/plugins/smart-enter.yazi/main.lua | 3 |
2 files changed, 6 insertions, 5 deletions
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 <kbd>l</kbd> 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 } |
