v0.2.5
This version introduces a new DDS (Data Distribution Service) aimed at facilitating communication and state synchronization between multiple Yazi instances, as well as state persistence.
It's built on a client/server architecture (without the need for running additional server processes), and deeply integrates with a Lua-based publish-subscribe model.
It also provides a set of new command-line options for interaction, such as ya pub, ya pub-static, yazi --local-events, yazi --remote-events, and currently used for:
-
dds-session.mp4
-
Change Yazi's
CWDtoPWDon subshell exitdds-cd.mp4
-
Integration with the new
yazi.nvimplugin: subscribing to file deletion, movement, and renaming events throughyazi --local-eventsto keep Neovim's buffer/LSP in sync -
bookmarks.yaziplugin: Saving bookmarks added by the user through the persistence feature provided by DDS
Performance optimizations
- Reduced CPU overhead during icon matching: Icon matching accounted for 35.6% of CPU time during rendering, and by changing the matching algorithm, this proportion has been reduced by ~10%
- Caching of each matched icon to avoid repeated calculations: By caching icons, further reductions in CPU usage for matching are achieved, as only a few new files that appear when scrolling through panes need to be matched
- Re-implemented the file watcher in an async way: This is the only sync I/O operation besides configuration initialization at startup, which occurs during
cdand scrolling through the file list. For certain slow external devices, Yazi would experience noticeable lagginess, which has now been addressed, see #877 for more details
Feature enhancements
- Re-implemented
fzfandzoxideas plugins for better flexibility:fzfandzoxidehave added more runtime error handling.zoxidenow supports the newupdate_dbfeature, which automatically adds Yazi'sCWDtozoxidewhen navigating. To enable it, add the following to yourinit.lua:require("zoxide"):setup { update_db = true, }
- Maintain the original modification time when copying files
- Support smart case for
cdpath completion - Add placeholder messages when there are no files in the directory
- Preserve the order of file selection when performing
open,shell, or bulk rename on multiple selected files - Prevent copying a directory to itself
The plugin system has also seen some improvements:
ya.dbg()andya.err()now support printing any type of data- New
psAPI as a carrier for DDS interaction ya.manager_emit()now supports passingUrltype
What's Changed
- fix: use
BTreeSetfor selected files to maintain order by @sxyazi in #799 - refactor: wrap
OpenerwithCowto avoid unnecessary memory reallocations when opening files by @sxyazi in #805 - fix: respond to the
SIGTERMsignal even when Yazi is in the background and has passed control of the terminal to the spawned process by @sxyazi in #797 - refactor: switch to
stderrby @sxyazi in #819 - feat: fix all dependencies to specific version numbers to allow non-
--lockedbuilds by @sxyazi in #821 - fix: adjust calculation for number of lines in a notification message by @Rolv-Apneseth in #828
- fix: disable ANSI encoding for formatted events for the
tracing_subscriberto clean up the logs by @Rolv-Apneseth in #832 - feat: enhance the
ya.dbg()andya.err()debugging functions by @sxyazi in #835 - perf: accelerate kitty graphics protocol encoding by avoiding string reallocation by @sxyazi in #837
- fix: mime-type for xz archives by @sxyazi in #841
- feat: time-based selection order preservation by @sxyazi in #843
- feat: add support for
YAZI_FILE_ONEto the built-infilepreviewer by @sxyazi in #846 - fix: Windows
cmd.exenot responding to correct CSI sequences due to ConPTY by @sxyazi in #845 - perf: add
BufWritertoStderrto avoid frequent system calls and increase rendering frame rate by @sxyazi in #849 - feat: DDS (Data Distribution Service) by @sxyazi in #826
- perf: port
require()andya.sync()to Rust to avoid plugin information initialization process by @sxyazi in #853 - feat: readable toml parsing error by @SoloJacobs in #854
- feat: add a new
senderproperty to the DDS payload by @sxyazi in #855 - feat: the
cdevent in DDS will now also be triggered when the tab is first created by @sxyazi in #861 - feat: detect CSI u through
Stderrto allow usingStdoutas the carrier of DDS payload without an ANSI sequence response timeout by @sxyazi in #867 - fix: a race condition in DDS static messages sent as internal events by @sxyazi in #868
- feat: add
is_execandis_stickytoChabindings by @sxyazi in #875 - perf: re-implement file watcher in an async way by @sxyazi in #877
- fix: CJK text rendering issue where the input popup component overlaps with images by @sxyazi in #879
- feat: re-implement
fzfas a built-in plugin by @sxyazi in #884 - feat: add new
--orphanoption to theshellcommand by @sxyazi in #887 - fix: file list expansion arguments (
$@,$*) of shell command under opener rules are out of order by @sxyazi in #890 - feat: add new
move,trash, anddeleteevent kinds to DDS by @mikavilpas in #880 - feat: add
YAZI_IDenvironment variable by @sxyazi in #895 - feat: when there are no files in the list, add a placeholder message by @sxyazi in #900
- feat: add loading state to directories by @sxyazi in #904
- feat: default "Reveal" opener for Linux by @sxyazi in #907
- perf: switch to
globsetto reduce CPU time spent on matching icons by @sxyazi in #908 - feat: trigger path completion with both
/and\on Windows by @ndtoan96 in #909 - feat: add a new
ya sendcommand to allow standalone client processes to communicate with DDS from the command line by @sxyazi in #913 - feat: allow creating a tab with the startup directory when the
tab_createcommand is called without specifying apathparameter by @sxyazi in #917 - feat: generate autocomplete script for
yacommand by @sxyazi in #919 - feat: allow opening interactively with the
--chosen-fileflag by @mikavilpas in #920 - fix: rollback ratatui to v0.26.1 to avoid panicking by @sxyazi in #922
- feat: expand the types supported by the event system by @sxyazi in #923
- feat: change status bar percent at 100 to Bot by @AidanV in #930
- fix: prevent pasting a directory into itself by @Rolv-Apneseth in #925
- feat: preserve files' modified at timestamp while copying by @Rolv-Apneseth in #926
- perf: cache each file's icon to avoid redundant calculations at rendering by @sxyazi in #931
- feat: split
ya sendintoya pubandya pub-staticto make it more ergonomic by @sxyazi in #933 - feat: new builtin
session.luaplugin by @sxyazi in #940
New Contributors
- @SoloJacobs made their first contribution in #854
- @mikavilpas made their first contribution in #880
- @AidanV made their first contribution in #930
Full Changelog: v0.2.4...v0.2.5