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
|
toggleterm-nvim
|
||||||
undotree
|
undotree
|
||||||
harpoon2
|
harpoon2
|
||||||
|
mini-files
|
||||||
oil-nvim
|
oil-nvim
|
||||||
|
|
||||||
# QoL - augments existing features to be a little nicer or adds some minor enhancements
|
# 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" })
|
vim.keymap.set("n", "];", dropbar_api.select_next_context, { desc = "Select next context" })
|
||||||
end,
|
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 {
|
return {
|
||||||
"oil.nvim",
|
"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()
|
after = function()
|
||||||
require("oil").setup({
|
require("oil").setup({
|
||||||
columns = {
|
columns = {
|
||||||
"size",
|
"size",
|
||||||
"icon",
|
"icon",
|
||||||
},
|
},
|
||||||
|
default_file_explorer = false,
|
||||||
use_default_keymaps = false,
|
use_default_keymaps = false,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["J"] = "actions.parent",
|
["J"] = "actions.parent",
|
||||||
|
@ -27,13 +46,5 @@ return {
|
||||||
["~"] = "actions.tcd",
|
["~"] = "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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue