summaryrefslogtreecommitdiff
path: root/.config/yazi/plugins/smart-enter.yazi
diff options
context:
space:
mode:
authorTom Li Dobnik <tomlidobnik1@gmail.com>2026-02-20 15:05:37 +0100
committerTom Li Dobnik <tomlidobnik1@gmail.com>2026-02-20 15:05:37 +0100
commitac0968042ddb333de5e3c371cc79b3b4ef098356 (patch)
tree6fba7deb2e7990b5842ef36ef1dad0f90e74d494 /.config/yazi/plugins/smart-enter.yazi
parent2dab9e093cced83b8a2ae3c477052594f70e9a4d (diff)
update
Diffstat (limited to '.config/yazi/plugins/smart-enter.yazi')
-rw-r--r--.config/yazi/plugins/smart-enter.yazi/README.md8
-rw-r--r--.config/yazi/plugins/smart-enter.yazi/main.lua3
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 }