v0.2.4
sxyazi/yaziv0.2.4Mar 9, 2024by github-actions[bot]
AI Summary
Adds cross-directory selection and significant accessibility improvements, including color icons and a selection counter. The Lua binding is rewritten using Unsafe Rust for cheaper initialization.
Key Highlights
- Cross-directory selection capability
- Improved accessibility with color icons and selection counter
- Unsafe Rust Lua binding for lazy loading and cheaper initialization
Breaking Changes
- Deprecation of the 'exec' property in favor of 'run'
New Features
- Cross-directory selection
- Color icons
- Selection counter in header
- ya.input(), ya.notify(), and ya.hide() APIs
- ui.Clear() component
- Vim-like notification component
- prepend_keymap and append_keymap options
Full Release Notes
This version adds support for [cross-directory selection](https://github.com/sxyazi/yazi/pull/693), which means you can select files from multiple different directories and perform operations on them. Yazi's accessibility also has been greatly improved, including adding color to icons, a new file selection counter, improved visibility of hovered files, enhanced keyword recognition in finds, long path truncation, and a new color system. As for the plugin system, we have rewritten Yazi's Lua binding using [Unsafe Rust](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html), making the initialization process of plugins very inexpensive by lazy-loading app data. This fundamentally solves the difficulty of cross-tab data access, making future plans for dual-pane/tree-view possible, as they can be efficiently implemented as a plugin! In addition, loaded plugins are now cached, meaning that plugin loading speed will be faster. The improvement in plugin performance directly reflects the overall performance of Yazi because in Yazi, plugins are first-class citizens, with most UI being drawn by built-in UI plugins, and previews and preloads also being done through plugins, which is the biggest driving force for us to constantly improve plugin performance. Finally, we have added some new APIs that we hope plugin developers will find useful: - [`ya.input()`](https://github.com/sxyazi/yazi/pull/762): Request user input; - [`ya.notify()`](https://github.com/sxyazi/yazi/pull/780): Send a foreground notification to the user, which is useful for background tasks; - [`ya.hide()`](https://github.com/sxyazi/yazi/pull/792): Request terminal control and hide Yazi in the background. This is useful for calling interactive programs like fzf, zoxide, etc., in plugins; - [`ui.Clear()`](https://github.com/sxyazi/yazi/pull/786): Clear a specific UI area, which is useful for implementing custom UI layouts. To implement `ya.notify()`, we have added a new [Vim-like notification](https://github.com/sxyazi/yazi/pull/659) component: https://github.com/sxyazi/yazi/assets/17523360/0765ecf4-9d90-49da-90d1-6b5d9a27901c For more changes, please read "What's Changed" below. ## Heads up The `exec` property will be deprecated in the next major version, v0.3, and will be replaced by `run`. Please replace all instances of `exec = ...` with `run = ...` in your `yazi.toml` and `keymap.toml` if any. ## What's Changed * perf: cheaper sync context initialization by @sxyazi in https://github.com/sxyazi/yazi/pull/643 * feat: allows access to complete app data for all tabs by @sxyazi in https://github.com/sxyazi/yazi/pull/644 * feat: add `<Home>` and `<End>` to `[input]` keymap by @grig-iv in https://github.com/sxyazi/yazi/pull/655 * feat: add `<Delete>` to `[input]` keymap by @grig-iv in https://github.com/sxyazi/yazi/pull/665 * ci: add clippy/rustfmt workflow by @uncenter in https://github.com/sxyazi/yazi/pull/663 * feat: enable the ability to sort the which key by @abhaysp95 in https://github.com/sxyazi/yazi/pull/662 * refactor: tab-specific selection by @sxyazi in https://github.com/sxyazi/yazi/pull/653 * feat: Vim-like notification by @sxyazi in https://github.com/sxyazi/yazi/pull/659 * feat: add `prepend_rules` and `append_rules` for `[icon]` by @grig-iv in https://github.com/sxyazi/yazi/pull/670 * feat: add new `scrolloff` option to `[manager]` by @dedukun in https://github.com/sxyazi/yazi/pull/679 * feat: add color to icons by @Andy-W-Developer in https://github.com/sxyazi/yazi/pull/683 * feat: expose selected/yanked files as API by @sxyazi in https://github.com/sxyazi/yazi/pull/674 * feat: add new file marked state by @sxyazi in https://github.com/sxyazi/yazi/pull/682 * feat: add counter component to the header for displaying currently selected/yanked items by @Rolv-Apneseth in https://github.com/sxyazi/yazi/pull/646 * feat: add icons for Scala, Elm and Java (.jar & .class) by @jpaju in https://github.com/sxyazi/yazi/pull/684 * feat: add a new option `--hovered` to the `open` command by @fakerepic in https://github.com/sxyazi/yazi/pull/687 * refactor: using definite patterns to simplify keybindings by @sxyazi in https://github.com/sxyazi/yazi/pull/690 * feat: nested selection conflict detection by @evpeople in https://github.com/sxyazi/yazi/pull/689 * feat: cross-directory selection by @sxyazi in https://github.com/sxyazi/yazi/pull/693 * fix: allow running `ya.sync` in a sync plugin call by @dedukun in https://github.com/sxyazi/yazi/pull/702 * fix: ignore further classified mime-types by @sxyazi in https://github.com/sxyazi/yazi/pull/707 * perf: cache loaded plugins by @sxyazi in https://github.com/sxyazi/yazi/pull/710 * feat: add icons for C#, KDL and Nushell by @lpnh in https://github.com/sxyazi/yazi/pull/711 * feat: better accessibility by @sxyazi in https://github.com/sxyazi/yazi/pull/719 * fix: rendering fails when no file type style is matched by @sxyazi in https://github.com/sxyazi/yazi/pull/721 * fix: skip when the mime-type cannot match due to file permissions by @sxyazi in https://github.com/sxyazi/yazi/pull/725 * refactor: new `yazi-boot` crate by @sxyazi in https://github.com/sxyazi/yazi/pull/728 * fix: initialize logs right after configurations by @dedukun in https://github.com/sxyazi/yazi/pull/708 * refactor: prefer `Display` over `ToString` by @sxyazi in https://github.com/sxyazi/yazi/pull/734 * feat: add hovered as `$0` for shell and opener by @rrveex in https://github.com/sxyazi/yazi/pull/738 * feat: add a new `[notify]` section to the `theme.toml` to configure the `notify` component's style by @evpeople in https://github.com/sxyazi/yazi/pull/749 * feat: add `prepend_rules` and `append_rules` for `[open]` in `yazi.toml` by @lpnh in https://github.com/sxyazi/yazi/pull/754 * feat: support `YAZI_FILE_ONE` environment variable for `file(1)` path by @ndtoan96 in https://github.com/sxyazi/yazi/pull/752 * perf: apply `add_many()`/`remove_many()` to the visual mode items for selection conflict detecting by @sxyazi in https://github.com/sxyazi/yazi/pull/758 * feat: support `%0` as the hovered file for Windows by @sxyazi in https://github.com/sxyazi/yazi/pull/761 * feat: `ya.input()` plugin API by @sxyazi in https://github.com/sxyazi/yazi/pull/762 * feat: add musl linux build targets by @uznog in https://github.com/sxyazi/yazi/pull/759 * fix: nested conflict detection exception when performing cross-level searches by @sxyazi in https://github.com/sxyazi/yazi/pull/769 * refactor: add new `run` property by @sxyazi in https://github.com/sxyazi/yazi/pull/773 * feat: add `Ctrl-[` as an escape key by @hankertrix in https://github.com/sxyazi/yazi/pull/763 * feat: `ya.notify()` plugin API by @sxyazi in https://github.com/sxyazi/yazi/pull/780 * feat: `ui.Clear` component for UI plugins by @sxyazi in https://github.com/sxyazi/yazi/pull/786 * feat: add `<C-p>` and `<C-n>` to the select component for moving the cursor up/down by @hankertrix in https://github.com/sxyazi/yazi/pull/779 * feat: send a foreground notification to the user when the process fails to run by @hqwuzhaoyi in https://github.com/sxyazi/yazi/pull/775 * feat: `cx.yanked` plugin API by @sxyazi in https://github.com/sxyazi/yazi/pull/788 * fix: track the latest file changes for the `selected`, `yanked` state when available by @sxyazi in https://github.com/sxyazi/yazi/pull/791 * feat: truncate path for deeply nested directories by @yixiaojiu in https://github.com/sxyazi/yazi/pull/787 * feat: `ya.hide()` plugin API by @sxyazi in https://github.com/sxyazi/yazi/pull/792 ## New Contributors * @grig-iv made their first contribution in https://github.com/sxyazi/yazi/pull/655 * @abhaysp95 made their first contribution in https://github.com/sxyazi/yazi/pull/662 * @dedukun made their first contribution in https://github.com/sxyazi/yazi/pull/679 * @jpaju made their first contribution in https://github.com/sxyazi/yazi/pull/684 * @fakerepic made their first contribution in https://github.com/sxyazi/yazi/pull/687 * @evpeople made their first contribution in https://github.com/sxyazi/yazi/pull/689 * @lpnh made their first contribution in https://github.com/sxyazi/yazi/pull/711 * @rrveex made their first contribution in https://github.com/sxyazi/yazi/pull/738 * @uznog made their first contribution in https://github.com/sxyazi/yazi/pull/759 * @hankertrix made their first contribution in https://github.com/sxyazi/yazi/pull/763 * @hqwuzhaoyi made their first contribution in https://github.com/sxyazi/yazi/pull/775 * @yixiaojiu made their first contribution in https://github.com/sxyazi/yazi/pull/787 **Full Changelog**: https://github.com/sxyazi/yazi/compare/v0.2.3...v0.2.4