update lua config
This commit is contained in:
parent
768e4e1b9e
commit
e474f94fb6
14 changed files with 417 additions and 66 deletions
|
@ -1,6 +1,6 @@
|
|||
# toggle-pane.yazi
|
||||
|
||||
Toggle the show, hide, and maximize states for different panes: parent, current, and preview. It respects the user's [`ratio` settings](https://yazi-rs.github.io/docs/configuration/yazi#manager.ratio)!
|
||||
Toggle the show, hide, and maximize states for different panes: parent, current, and preview. It respects the user's [`ratio` settings](https://yazi-rs.github.io/docs/configuration/yazi#mgr.ratio)!
|
||||
|
||||
Assume the user's `ratio` is $$[A, B, C]$$, that is, $$\text{parent}=A, \text{current}=B, \text{preview}=C$$:
|
||||
|
||||
|
@ -15,7 +15,7 @@ Assume the user's `ratio` is $$[A, B, C]$$, that is, $$\text{parent}=A, \text{cu
|
|||
## Installation
|
||||
|
||||
```sh
|
||||
ya pack -a yazi-rs/plugins:toggle-pane
|
||||
ya pkg add yazi-rs/plugins:toggle-pane
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
@ -24,7 +24,7 @@ Hide/Show preview:
|
|||
|
||||
```toml
|
||||
# keymap.toml
|
||||
[[manager.prepend_keymap]]
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "T"
|
||||
run = "plugin toggle-pane min-preview"
|
||||
desc = "Show or hide the preview pane"
|
||||
|
@ -34,7 +34,7 @@ Maximize/Restore preview:
|
|||
|
||||
```toml
|
||||
# keymap.toml
|
||||
[[manager.prepend_keymap]]
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "T"
|
||||
run = "plugin toggle-pane max-preview"
|
||||
desc = "Maximize or restore the preview pane"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
--- @since 25.2.26
|
||||
--- @since 25.5.28
|
||||
--- @sync entry
|
||||
|
||||
local function entry(st, job)
|
||||
|
@ -39,13 +39,7 @@ local function entry(st, job)
|
|||
Tab.layout, st.old = st.old, nil
|
||||
st.parent, st.current, st.preview = nil, nil, nil
|
||||
end
|
||||
|
||||
-- TODO: remove this in the future
|
||||
if ya.emit then
|
||||
ya.emit("app:resize", {})
|
||||
else
|
||||
ya.app_emit("resize", {})
|
||||
end
|
||||
ya.emit("app:resize", {})
|
||||
end
|
||||
|
||||
return { entry = entry }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue