-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating to Yazi v0.3.0 #1046
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Lua API breaking changes in Yazi v0.3
|
This comment was marked as off-topic.
This comment was marked as off-topic.
PackagingChanged
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Yazi v0.3.0 added a new default-on build feature that controls whether Lua should be vendored. For distributions using patches to let Yazi use not-vendored Lua, now the patch can be replaced with |
After three months of development, I'm excited to announce the release of Yazi 0.3 today! This version brings a host of new features and bug fixes. Thank you to every contributor for making Yazi better and better! This is a breaking change release, so please make sure to read: Migrating to Yazi v0.3.0, sxyazi/yazi#1046 Packaging, sxyazi/yazi#1046 (comment) Lua API breaking changes in Yazi v0.3, sxyazi/yazi#1046 (comment) - Mouse support The plugin system now includes five new APIs for each component - click, scroll, touch, move, and drag to handle mouse events. These APIs come with default implementations to cover common operations. This also allows plugin developers to extend mouse behavior and create any functionality they desire. See #1038 for more info, thanks to @qsdrqs for his work on this! - New builtin extract plugin #1321 adds a builtin extract plugin for decompressing archives, with these features: - Interactive password input. - Smart output directory selection with auto renaming. - Supports decompressing multiple files at once. - Fully async, decompression tasks can queue up and run in the background. - Enhanced file preview Yazi 0.3 now supports the following new format to preview: - Fonts - SVGs - HEIC files - JPEG XL files This feature requires the optional dependency ImageMagick to enable it. - Package manager Yazi 0.3 introduces the new ya pack subcommand for package management, making plugin and theme updates more convenient. This is especially important as the plugin system is not yet stable, so providing users with the ability to easily keep everything up to date is necessary. - Redesigned Icons #1086 redesigns the icons, bringing the following improvements: - Improved Matching Performance: The new dirs, files, and exts compile the icon rules into a HashMap at startup. This allows most icon matches to be completed with O(1) complexity, significantly enhancing performance. - Built-in nvim-web-devicons: This includes a richer and ready-to-use set of icons out of the box. - Enhanced Icon Styling: Each icon now supports specifying both dark and light colors (currently only fg_dark is used). In the future, the terminal color will automatically choose the appropriate color. This was added as part of #988. - Enhanced is Function: The original is functionality has been reimplemented as conds to allow more complex conditional expressions, such as cond = "!dir & exec". - Significant archive preview performance improvements #1220 reimplements archive previewing to be streamed. This means only a small amount of necessary data needs to be read to display the preview immediately, rather than waiting for all the data to be returned and parsed as before. Additionally, by replacing lsar with 7zip, the preview speed has been further improved. The new implementation also introduces two new features: icon display and file size display. - Other improvements These are a few of my favorite features. For a complete list of improvements in Yazi 0.3, check out the full changelog. What's Changed feat: support yazi-cli for Nix flake by @XYenon in #944 feat: allow building with the system Lua by @Kladki in #943 feat: support expanding Windows paths like "D:" that only have a drive letter but no root by @sxyazi in #948 fix: always create XDG cache directory even if user has set a custom one by @sxyazi in #956 feat: support previewing files containing non-UTF-8 characters by @sxyazi in #958 fix: correct the glob pattern for the icons to fit the new matching algorithm by @sxyazi in #959 feat: add *.opus file icon by @Brixy in #967 fix: improve accessibility by avoiding hex color code for white by @Brixy in #968 fix: avoiding duplicate candidates in the which component by @mikavilpas in #975 feat: detect terminal type in tmux with CSI sequence in passthrough mode by @sxyazi in #977 feat: add more rules to [filetype] and [icon] by @Brixy in #966 feat: re-enable the file created attribute by @rafi in #987 feat: add --force-window option to mpv by @GOWxx in #998 feat: close confirmation prompts and exit automatically when the ongoing task gone by @sxyazi in #997 fix: notification title width does not include the width of the icon by @sxyazi in #1000 feat: support cargo binstall yazi-fm and cargo binstall yazi-cli by @slowsage in #1003 feat: yazi --debug shows ya version in its output by @mikavilpas in #1005 feat: add git commit hash to ya --version by @fzdwx in #1006 feat: package manager by @sxyazi in #985 feat: ya pack displays help if no arguments are given by @mikavilpas in #1012 feat: new --args parameter for fd an rg search by @LatentDream in #1013 fix: correct wasm target condition by @itsjunetime in #1018 fix: broaden file watcher event types to accommodate permission changes on certain platforms by @sxyazi in #1024 feat: add new debounce option to ya.input() API by @sxyazi in #1025 fix: recognize TERM=rxvt-unicode-256color by @dtolnay in #1027 feat: support stdin and pipe for Child API by @sxyazi in #1033 ci: consistently enforce Lua coding style by @mikavilpas in #1029 ci: fix cargo unit tests execution by @clispios in #1041 refactor: eliminate exec by @sxyazi in #1045 feat: use Ctrl-c instead of Ctrl-q as the universal close key for all components by @sxyazi in #1047 fix: remove ignore options from rg and fd search by @chriszarate in #1043 feat: font preview by @sxyazi in #1048 docs: add CONTRIBUTING.md by @johan-naizu in #1052 feat: prefetcher by @sxyazi in #1061 fix: ePUB file mime-type matching for the opener rule by @sxyazi in #1063 fix: cursor gets out of sync occasionally at image previewing through IIP under tmux by @sxyazi in #1070 feat: support Super/Command/Windows key notation D- by @sxyazi in #1069 fix: remove the default keybinding for going to the temporary directory by @sxyazi in #1073 feat!: redesign icons by @sxyazi in #1086 fix: Sixel support from certain st forks cannot be detected by @sxyazi in #1094 feat: support case insensitive special keys in keymappings by @mikavilpas in #1082 refactor!: v0.3 API changes by @sxyazi in #1108 feat: add pack --list subcommand to Ya CLI by @lpnh in #1110 feat!: DDS client-server version check by @sxyazi in #1111 feat: support mouse event by @qsdrqs in #1038 feat: add some dependency version information to yazi --debug by @omagdy7 in #1112 fix: block SIGINT signal from the spawned subprocess by @sxyazi in #1131 feat: support completely disabling mouse with mouse_events=[]; add new cursor_blink to control cursor style of input components by @sxyazi in #1139 fix: different filenames should be treated as the same file on case-insensitive file systems by @sxyazi in #1151 feat: support ya sub subcommand for the Ya CLI by @mikavilpas in #1004 fix: file watcher didn't handle realname resolution used for case-insensitive file systems correctly by @sxyazi in #1179 feat: include file filter state in the header by @thelamb in #1182 feat!: include the sender ID in static messages by @sxyazi in #1172 fix: accommodate all hover events for DDS by @Xerxes-2 in #1187 feat: support x-ndjson mime-type for JSON files by @sxyazi in #1190 fix: suppress warnings for different name representations of the same file in the case-insensitive file system when renaming by @Xerxes-2 in #1185 fix: ueberzug image adapter should respect the user's max_width and max_height settings by @sxyazi in #1200 fix: magick plugin not working properly by @sxyazi in #1213 perf!: reimplement and significantly speed up archive previewing by @sxyazi in #1220 feat: add --hovered option to the rename and remove commands by @hankertrix in #1227 feat: support right-click to open files by @sxyazi in #1232 feat: support AVIF image preview by @sxyazi in #1249 feat: ownership linemode by @AidanV in #1238 feat: add nlink property to the Cha plugin API by @Ape in #1279 feat: add random option to the sort command by @zooeywm in #1291 feat: show files with inaccessible metadata by @Ape in #1275 feat: help users migrate shell key bindings to v0.3 by @mikavilpas in #1304 feat: allow setting YAZI_ID as a command line argument by @mikavilpas in #1305 refactor: reimplement the signal system by @sxyazi in #1307 fix: destroy term before stopping signals by @sxyazi in #1310 fix: add use-dev-tty to fix piping to Yazi on macOS by @joshuali925 in #1317 refactor: fix Clippy warnings by @Ape in #1312 feat: add Winget publishes to CI/CD by @MoaidHathot in #1299 feat: add support for %@ argument extension on Windows to align with Unix platforms by @sxyazi in #1319 fix: wrong directory loading optimization condition by @sxyazi in #1331 feat: make F1 also show the help menu by @CyberShadow in #1336 fix: help menu multi-line text rendering by @sxyazi in #1347 fix: can't rewatch a directory that has been deleted once before by @leihaojun in #1335 fix(nix): add outputHashes for notify git dependency by @uncenter in #1373 feat(nix): set VERGEN_* build env vars by @uncenter in #1375 refactor(nix): cleanup and switch to nixfmt-rfc-style by @uncenter in #1376 chore: bump version to 0.3 by @sxyazi in #1374
Hi @sxyazi |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
TOC
Eliminated the
exec
propertySince Yazi v0.2.4,
exec
has been deprecated and replaced with a newrun
property and some compatibility code has been written to ensure users can transition smoothly.In Yazi v0.3, these compatibility codes will be removed, meaning
exec
will be completely eliminated.Please replace all instances of
exec = ...
withrun = ...
in youryazi.toml
,keymap.toml
, andtheme.toml
files if any, for example:Eliminated the
jump
commandIn Yazi v0.2.5, the
jump
command has been deprecated, andzoxide
andfzf
have been re-implemented as built-in plugins to enhance their functionality and provide better flexibility (See #865 for details).In Yazi v0.3, the compatibility code of
jump
command will be deleted. Please replace them in yourkeymap.toml
if any:Removed the
mime
plugin from preloadersYazi v0.3 introduced a fetcher to simplify preloader design, and reclassified the
mime
plugin as part of the fetcher.If you copied the entire
preloaders
before, please remove it from the list:Changed the behavior of the
sort
command's--reverse
and--dir-first
optionsIf you use a custom configuration and have overridden the
,
key series, please update them to the latest (See thesort
docs for details):yazi/yazi-config/preset/keymap.toml
Lines 109 to 120 in 46cd42f
The reason for this change
Before Yazi v0.3, the
sort
command was stateless. It didn’t consider the current sorting state of the directory. For example, if the directory was in reverse order, usingsort new-ordering
would lose that setting, and you’d have to usesort new-ordering --reverse
to keep it.If the directory had both
--reverse
and--dir-first
enabled, you’d have to usesort new-ordering --reverse --dir-first
, which was cumbersome. Yazi v0.3 introduced thesort --translit
option, exacerbating this issue.Therefore, in Yazi v0.3, the behavior was changed: the new
sort
command respects the previous directory sorting state. If--reverse
isn’t passed, it won’t change the state, and--reverse
/--dir-first
now also supports--reverse=no
to explicitly cancel it.Used
Ctrl-c
instead ofCtrl-q
as the universal close key for all componentsCtrl-c
is more in line with conventions, and it's closer toCtrl
, which makes it more convenient to press. See #763 (comment) and #779 (comment) for more details.This is a change in user behavior, so it's listed as a breaking change here. For users who copy the entire
keymap.toml
configuration file or use a custom key, they will not be affected.Used
K
andJ
for theseek
commandseek -5
has been changed from<A-k>
toK
, andseek 5
has been changed from<A-j>
toJ
.This is because scrolling the preview pane is a common operation, but some terminals do not support
Alt
key combinations or have them disabled by default. On macOS, there's noAlt
key, onlyOption
, and some terminals require additional settings to mapOption
toAlt
(like themacos_option_as_alt
option in kitty).arrow -5
andarrow 5
have been also removed, they were previously bound toK
andJ
and initially added to satisfy my own navigation needs before therelative-motions.yazi
plugin existed. Since then, I've realized that using a fixed movement of 5 lines is quite subjective and many users don't use it at all.Used
<S-Enter>
instead of<C-Enter>
as the alternative key for interactiveopen
Previously,
<C-Enter>
was used as an alternative key for interactiveopen
, in Yazi v0.3, changing it to<S-Enter>
aligns with the behavior ofo
/O
-o
for direct file opening,O
(Shift-o) for interactive file opening.This change makes the behavior more intuitive and reduces additional cognitive burden. This is a change in user behavior, so it's listed as a breaking change here.
Redesigned icons
See #1086 for details.
Renamed the shell wrapper to
yy
, in favor of the new Ya CLIThis is a change in user behavior, so it's listed as a breaking change here. See #914 for details.
For users who do not need the new CLI program, they will not be affected since shell function takes precedence over binary programs.
The text was updated successfully, but these errors were encountered: