feat: add mini-files as primary file explorer
This commit is contained in:
parent
1354bf104f
commit
fde1120b8d
3 changed files with 35 additions and 8 deletions
|
@ -153,6 +153,7 @@
|
|||
toggleterm-nvim
|
||||
undotree
|
||||
harpoon2
|
||||
mini-files
|
||||
oil-nvim
|
||||
|
||||
# QoL - augments existing features to be a little nicer or adds some minor enhancements
|
||||
|
|
|
@ -285,4 +285,19 @@ return {
|
|||
vim.keymap.set("n", "];", dropbar_api.select_next_context, { desc = "Select next context" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mini.files",
|
||||
after = function()
|
||||
require("mini.files").setup({
|
||||
windows = { preview = true, width_preview = 40 },
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>e", function()
|
||||
MiniFiles.open(vim.api.nvim_buf_get_name(0))
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>fe", function()
|
||||
MiniFiles.open(nil, false)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,11 +1,30 @@
|
|||
-- we still use oil.nvim for more complex filesystem manipulations
|
||||
return {
|
||||
"oil.nvim",
|
||||
cmd = "Oil",
|
||||
keys = {
|
||||
{
|
||||
"<leader>bf",
|
||||
function()
|
||||
vim.cmd("Oil " .. vim.fn.getcwd())
|
||||
end,
|
||||
mode = "n",
|
||||
desc = "Open oil in current working directory",
|
||||
},
|
||||
{
|
||||
"<leader>be",
|
||||
vim.cmd.Oil,
|
||||
mode = "n",
|
||||
desc = "Open oil in current file directory",
|
||||
},
|
||||
},
|
||||
after = function()
|
||||
require("oil").setup({
|
||||
columns = {
|
||||
"size",
|
||||
"icon",
|
||||
},
|
||||
default_file_explorer = false,
|
||||
use_default_keymaps = false,
|
||||
keymaps = {
|
||||
["J"] = "actions.parent",
|
||||
|
@ -27,13 +46,5 @@ return {
|
|||
["~"] = "actions.tcd",
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>e", function()
|
||||
vim.cmd("Oil")
|
||||
end, { desc = "Open file explorer in current file directory" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fe", function()
|
||||
vim.cmd("Oil " .. vim.fn.getcwd())
|
||||
end, { desc = "Open file explorer in current working directory" })
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue