Skip to content

Commit

Permalink
docs: add @sync entry metadata to sync plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Nov 7, 2024
1 parent fb745ba commit 510d4d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ to exiting input directly, without entering Vi mode, making it behave like a reg
Save these lines as `~/.config/yazi/plugins/smart-enter.yazi/init.lua`:

```lua
--- @sync entry
return {
entry = function()
local h = cx.active.current.hovered
Expand All @@ -89,6 +90,7 @@ which means both will only target the currently hovered file. If you still want
Save these lines as `~/.config/yazi/plugins/smart-paste.yazi/init.lua`:

```lua
--- @sync entry
return {
entry = function()
local h = cx.active.current.hovered
Expand Down Expand Up @@ -220,6 +222,7 @@ Moved to https://github.com/yazi-rs/plugins/tree/main/hide-preview.yazi
Save these lines as `~/.config/yazi/plugins/arrow.yazi/init.lua`:

```lua
--- @sync entry
return {
entry = function(_, args)
local current = cx.active.current
Expand Down Expand Up @@ -266,6 +269,7 @@ return { entry = entry }
<TabItem value="skip-files" label="Skip files">

```lua
--- @sync entry
local function entry(_, args)
local parent = cx.active.parent
if not parent then return end
Expand Down

0 comments on commit 510d4d1

Please sign in to comment.