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
Please describe the problem you're trying to solve
I will try to explain my use case a bit:
I noticed that in yazi.nvim, pressing <tab> is the default key for "cycling buffers" - making yazi focus on the next open split window in neovim. This has worked fine for a long time, but currently yazi.nvim mappings are not that fancy - they completely hijack the tab key in this case and never send it to yazi.
I worked around this issue in mikavilpas/yazi.nvim#894 by allowing users (me) to define a yazi keymap for sending a custom DDS event using ya pub. yazi.nvim is able to react to this event and execute the action. This makes the <tab> key usable for other tasks and avoids the problem.
But I noticed that if I have two neovims open, and they both have a yazi open, pressing <tab> in one will execute the action in both editors 🙂
This is because yazi.nvim does not check what yazi session the event is associated with (all events are global). This is not a big problem right now, but eventually I would like to allow power users to define all yazi.nvim keymappings this way because the user experience is much better.
I know I could define my own protocol with either a --str or --json payload, but it might be an "easy win" to add this to yazi somehow.
Let me know what you think!
Would you be willing to contribute this feature?
Yes, I'll give it a shot
Describe the solution you'd like
I am currently passing the --client-id flag when starting yazi so that I can ya emit-to commands to it (currently reveal and open only).
Do you think it would make sense to allow passing this flag to ya as well? It looks like the defaults are currently used here
Actually I realized that --client-id needs to be hardcoded to the mapping because it's different each time. Maybe it could be read from an environment variable, but I'm not sure it's that useful to do anymore.
yazi --debug
outputPlease describe the problem you're trying to solve
I will try to explain my use case a bit:
I noticed that in yazi.nvim, pressing
<tab>
is the default key for "cycling buffers" - making yazi focus on the next open split window in neovim. This has worked fine for a long time, but currently yazi.nvim mappings are not that fancy - they completely hijack the tab key in this case and never send it to yazi.I worked around this issue in mikavilpas/yazi.nvim#894 by allowing users (me) to define a yazi keymap for sending a custom DDS event using
ya pub
. yazi.nvim is able to react to this event and execute the action. This makes the<tab>
key usable for other tasks and avoids the problem.But I noticed that if I have two neovims open, and they both have a yazi open, pressing
<tab>
in one will execute the action in both editors 🙂This is because yazi.nvim does not check what yazi session the event is associated with (all events are global). This is not a big problem right now, but eventually I would like to allow power users to define all yazi.nvim keymappings this way because the user experience is much better.
I know I could define my own protocol with either a
--str
or--json
payload, but it might be an "easy win" to add this to yazi somehow.Let me know what you think!
Would you be willing to contribute this feature?
Describe the solution you'd like
I am currently passing the
--client-id
flag when starting yazi so that I canya emit-to
commands to it (currentlyreveal
andopen
only).Do you think it would make sense to allow passing this flag to
ya
as well? It looks like the defaults are currently used hereyazi/yazi-cli/src/main.rs
Lines 88 to 95 in 6bd7a80
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: