add nvim-tree

This commit is contained in:
2025-10-26 10:23:16 +09:00
parent df2acf298b
commit 08274e8ad8
4 changed files with 111 additions and 46 deletions

View File

@@ -1,44 +1,45 @@
---@type LazySpec
return {
"mikavilpas/yazi.nvim",
version = "*", -- use the latest stable version
event = "VeryLazy",
dependencies = {
{ "nvim-lua/plenary.nvim", lazy = true },
},
keys = {
-- 👇 in this section, choose your own keymappings!
{
"<leader>-",
mode = { "n", "v" },
"<cmd>Yazi<cr>",
desc = "Open yazi at the current file",
},
{
-- Open in the current working directory
"<leader>cw",
"<cmd>Yazi cwd<cr>",
desc = "Open the file manager in nvim's working directory",
},
{
";",
"<cmd>Yazi toggle<cr>",
desc = "Resume the last yazi session",
},
},
---@type YaziConfig | {}
opts = {
-- if you want to open yazi instead of netrw, see below for more info
open_for_directories = false,
keymaps = {
show_help = "<f1>",
},
},
-- 👇 if you use `open_for_directories=true`, this is recommended
init = function()
-- mark netrw as loaded so it's not loaded at all.
--
-- More details: https://github.com/mikavilpas/yazi.nvim/issues/802
vim.g.loaded_netrwPlugin = 1
end,
}
return {}
-- ---@type LazySpec
-- return {
-- "mikavilpas/yazi.nvim",
-- version = "*", -- use the latest stable version
-- event = "VeryLazy",
-- dependencies = {
-- { "nvim-lua/plenary.nvim", lazy = true },
-- },
-- keys = {
-- -- 👇 in this section, choose your own keymappings!
-- {
-- "<leader>-",
-- mode = { "n", "v" },
-- "<cmd>Yazi<cr>",
-- desc = "Open yazi at the current file",
-- },
-- {
-- -- Open in the current working directory
-- "<leader>cw",
-- "<cmd>Yazi cwd<cr>",
-- desc = "Open the file manager in nvim's working directory",
-- },
-- {
-- ";",
-- "<cmd>Yazi toggle<cr>",
-- desc = "Resume the last yazi session",
-- },
-- },
-- ---@type YaziConfig | {}
-- opts = {
-- -- if you want to open yazi instead of netrw, see below for more info
-- open_for_directories = false,
-- keymaps = {
-- show_help = "<f1>",
-- },
-- },
-- -- 👇 if you use `open_for_directories=true`, this is recommended
-- init = function()
-- -- mark netrw as loaded so it's not loaded at all.
-- --
-- -- More details: https://github.com/mikavilpas/yazi.nvim/issues/802
-- vim.g.loaded_netrwPlugin = 1
-- end,
-- }