yazi: update
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- @since 25.2.26
|
||||
--- @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.mgr_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 }
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- @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 })
|
||||
end
|
||||
|
||||
return { entry = entry, setup = setup }
|
||||
Reference in New Issue
Block a user