You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yazi
Version: 25.2.26 (6b0a530 2025-02-26)
Debug :false
Triple : x86_64-unknown-linux-gnu (linux-x86_64)
Rustc : 1.85.0 (4d91de4e 2025-02-17)
Ya
Version: 0.3.3 (81ce040 2024-11-06)
Emulator
TERM : Some("xterm-kitty")
TERM_PROGRAM : None
TERM_PROGRAM_VERSION: None
Brand.from_env : Some(Kitty)
Emulator.detect : Emulator { kind: Left(Kitty), light: false, cell_size: Some((11,25)) }
Adapter
Adapter.matches: Kgp
Desktop
XDG_SESSION_TYPE : Some("wayland")
WAYLAND_DISPLAY : Some("wayland-1")
DISPLAY : Some(":0")
SWAYSOCK : None
HYPRLAND_INSTANCE_SIGNATURE: Some("882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff_1740648054_265186191")
WAYFIRE_SOCKET : None
SSH
shared.in_ssh_connection: false
WSL
WSL: false
Variables
SHELL : Some("/usr/bin/bash")
EDITOR : Some("/usr/bin/nvim")
VISUAL : Some("/usr/bin/nvim")
YAZI_FILE_ONE : None
YAZI_CONFIG_HOME: None
YAZI_ZOXIDE_OPTS: None
FZF_DEFAULT_OPTS: Some("--no-mouse --height 50% -1 --reverse --multi --inline-info --preview=\'[[ $(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --color always {} || cat {}) 2> /dev/null | head -300\' --preview-window=\'up:70%:hidden:wrap\' --bind=\'f3:toggle-preview\'")
Text Opener
default : Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR (block)", for_: None, spread: true })
block-create: Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR (block)", for_: None, spread: true })
block-rename: Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR (block)", for_: None, spread: true })
Multiplexers
TMUX :false
tmux version : No such file or directory (os error 2)
tmux build flags : enable-sixel=Unknown
ZELLIJ_SESSION_NAME: None
Zellij version : No such file or directory (os error 2)
Dependencies
file : 5.46
ueberzugpp : No such file or directory (os error 2)
ffmpeg/ffprobe: 7.1 / 7.1
pdftoppm : 25.02.0
magick : 7.1.1-44
fzf : 0.60.2
fd/fdfind : 10.2.0 / No such file or directory (os error 2)
rg : 14.1.1
chafa : 1.14.5
zoxide : 0.9.7
7zz/7z : No such file or directory (os error 2) / 24.09
jq : 1.7.1
Clipboard
wl-copy/paste: 2.2.1 / 2.2.1
xclip : No such file or directory (os error 2)
xsel : No such file or directory (os error 2)
See https://yazi-rs.github.io/docs/plugins/overview#debugging on how to enable logging or debug runtime errors.
Please describe the problem you're trying to solve
Before yazi 0.4, plugins could be called in synchronous or asynchronous mode.
Some functionality, like UI needs to be synchronous. Creating the UI needs to happen in sync mode because it updates global variables (like Root etc.). Trying to call any ya.manager_emit() function that updates the UI and causes redraw doesn't work in async mode (it happens in the background and the UI isn't updated correctly.
On the other hand, functions like ya.input() or Command only work in asynchronous mode.
So a plugin that wants to create some UI and also be able to interact with the user (input) and call external commands, cannot work as things are now after #1891
Would you be willing to contribute this feature?
Yes, I'll give it a shot
Describe the solution you'd like
There could be several ways to add this feature without bringing back the old interface:
Allow some way of calling asynchronous functions from a sync context (in the event loop)
I have a plugin that is not viable any more. I tried to re-write it several times in full asynchronous mode, and it doesn't work. It is either sync and some functionality won't be available (input, shell commands), or async, and then UI redraw doesn't work. Even if I put all the UI creation in ya.sync() functions, then redraw doesn't happen correctly, as the plugin is executed in the async context and the UI doesn't update correctly.
Before archiving the plugin I would like to give it a last effort if you tell me there is any solution to this.
I will add multi-entry support in the next release, at which point you'll be able to specify different runtimes for different plugin entry points.
In the meantime, could you let me know what kind of issues you encountered during the rewrite? I'll see if I can offer any help; a minimal reproduction of the problem would be incredibly helpful!
Here are some asynchronous plugins that involve UI rendering, which might provide some inspiration:
yazi --debug
outputPlease describe the problem you're trying to solve
Before yazi 0.4, plugins could be called in synchronous or asynchronous mode.
Some functionality, like UI needs to be synchronous. Creating the UI needs to happen in sync mode because it updates global variables (like Root etc.). Trying to call any
ya.manager_emit()
function that updates the UI and causes redraw doesn't work in async mode (it happens in the background and the UI isn't updated correctly.On the other hand, functions like
ya.input()
orCommand
only work in asynchronous mode.So a plugin that wants to create some UI and also be able to interact with the user (input) and call external commands, cannot work as things are now after #1891
Would you be willing to contribute this feature?
Describe the solution you'd like
There could be several ways to add this feature without bringing back the old interface:
--sync
option for theplugin
command #1891: multi-file plugins where each file can be sync or async. It seems that was a complicated solution and didn't get much traction.Additional context
I have a plugin that is not viable any more. I tried to re-write it several times in full asynchronous mode, and it doesn't work. It is either sync and some functionality won't be available (input, shell commands), or async, and then UI redraw doesn't work. Even if I put all the UI creation in
ya.sync()
functions, then redraw doesn't happen correctly, as the plugin is executed in the async context and the UI doesn't update correctly.Before archiving the plugin I would like to give it a last effort if you tell me there is any solution to this.
Checklist
The text was updated successfully, but these errors were encountered: