Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Latest commit

 

History

History
101 lines (79 loc) · 2.37 KB

README.md

File metadata and controls

101 lines (79 loc) · 2.37 KB

yazi.nvim

—— A Neovim plugin for Yazi

Warning

I gave up this project, because I haven't extra time to care it and I found a plugin (mikavilpas/yazi.nvim) same as and better than this plugin, you can use that plugin instead of this.

Disclaimer

I straight-up copied most of the code in this plugin from ranger.nvim because I just wanted something working asap. The only reason I didn't fork ranger.nvim but made a new repository instead was because this is plugin for a completely different purpose (not for using Ranger). I want to give credits to the author of ranger.nvim for writing awesome code and thank him for using the MIT licence.

Dependencies

Install

lazy.nvim

{
  "SR-MyStar/yazi.nvim",
  opts = {
    -- ...
  },
}

or use Lazy-load feature

{
  "SR-Mystar/yazi.nvim",
  lazy = true,
  cmd = "Yazi",
  opts = {
    -- ...
  },
  keys = {
    -- ...
  },
}

Configuration

defualt config

{
  size = {
    width = 0.9,
    height = 0.8,
  },
  command_args = {
    open_dir = vim.cmd.edit,
    open_file = vim.cmd.edit,
    cwd = nil,
    on_open = nil,
  },
  pos = "cc",           -- see `:h yazi-win-position`
  style = "minimal",    -- "" | "minimal"
  border = "single",    -- "none" | "single" | "double" | "rounded" | "solid" | "shadow"
  title = " Yazi ",
  title_pos = "center", -- "center" | "left" | "right"
}

Using

Open selected files in new buffers:

:Yazi

or

:lua require("yazi").open()

You will be able to use the following arguments:

arguments description
open_file(path) use a function to open files
cwd change working directory
on_open() do something on opening yazi
open_dir(path) use a function to open dir