diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index 7bde445e..0d90c688 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -91,7 +91,7 @@ end, { desc = "Open Yank History", remap = false }) -- map({ "n" }, "z-", "z=", { desc = "Spelling Suggestions", remap = true }) -- Oil.nvim open parent directory -map("n", "-", "Oil", { desc = "Open Oil" }) +-- map("n", "-", "Oil", { desc = "Open Oil" }) -- TODO: add leader + y for save current buf, leader + Y to write all map({ "n", "x" }, "y", "w", { desc = "Save" }) diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua index 56cb6205..dabcec6a 100644 --- a/.config/nvim/lua/plugins/oil.lua +++ b/.config/nvim/lua/plugins/oil.lua @@ -1,5 +1,6 @@ return { "stevearc/oil.nvim", + enabled = true, ---@module 'oil' ---@type oil.SetupOpts opts = { @@ -17,6 +18,9 @@ return { -- [""] = "actions.parent", }, }, + keys = { + { "n", "-", "Oil", { desc = "Open Oil" } }, + }, -- Optional dependencies dependencies = { { "echasnovski/mini.icons", opts = {} } }, -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons diff --git a/.config/nvim/lua/plugins/yazi.lua b/.config/nvim/lua/plugins/yazi.lua new file mode 100644 index 00000000..ee8d9a80 --- /dev/null +++ b/.config/nvim/lua/plugins/yazi.lua @@ -0,0 +1,30 @@ +return { + "mikavilpas/yazi.nvim", + event = "VeryLazy", + keys = { + -- 👇 in this section, choose your own keymappings! + { + "-", + "Yazi", + desc = "Open yazi at the current file", + }, + { + -- Open in the current working directory + "_", + "Yazi cwd", + desc = "Open the file manager in nvim's working directory", + }, + { + "L", + "Yazi toggle", + desc = "Resume the last yazi session", + }, + }, + opts = { + -- if you want to open yazi instead of netrw, see below for more info + open_for_directories = false, + keymaps = { + show_help = "", + }, + }, +}