Skip to content

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Mar 16, 2025

After this PR, the runtime environment of the previewer (synchronous or asynchronous) will be distributed as metadata together with the source code.

This means that when a plugin needs to change the runtime, it will no longer require users to modify it in their yazi.toml.

⚠️ Breaking changes

sync = true has been removed:

# yazi.toml
[plugin]
prepend_previewers = [
-  { name = "*/", run = "folder", sync = true },
+  { name = "*/", run = "folder" },
]

and replaced with the new --- @sync peek annotation:

# ~/.config/yazi/plugins/folder.yazi/main.lua
+ --- @sync peek

Considering that except for the preset folder previewer, almost all previewers are asynchronous, the impact of this change should be reasonably small.

Doc https://yazi-rs.github.io/docs/plugins/overview#@sync

@sxyazi sxyazi merged commit 8b3ce18 into main Mar 16, 2025
6 checks passed
@sxyazi sxyazi deleted the pr-6e78dee7 branch March 16, 2025 09:41
Lemi0002 pushed a commit to Lemi0002/yazi that referenced this pull request Apr 10, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant