1
0
Fork 0

rework lf with new plugin

This commit is contained in:
Luca Bilke 2024-01-29 10:49:31 +01:00
parent fc8afb0be8
commit fe100b1e1a
3 changed files with 13 additions and 22 deletions

View file

@ -15,6 +15,7 @@ M.sections = {
t = { desc = icons.Console .. " Terminal" },
u = { desc = icons.Gear .. " Utility" },
n = { desc = icons.Note .. " Notes" },
e = { desc = icons.FileTree .. " File Manager" },
}
-- Standard --
@ -147,8 +148,13 @@ if f.is_available("gitsigns.nvim") then
maps.n["<Leader>gd"] = { function() require("gitsigns").diffthis() end, desc = "View Git diff" }
end
if f.is_available("lf.nvim") then
maps.n["<Leader>e"] = { require("lf").start, desc = "File manager" }
if f.is_available("taolf") then
maps.n["<Leader>e"] = M.sections.e
maps.n["E"] = { function() require("taolf").start() end, desc = "File manager" }
maps.n["gE"] = { "<Noop>" }
maps.n["<Leader>ee"] = { function() require("taolf").start() end, desc = "File manager" }
maps.n["<Leader>eg"] = { function() require("taolf").start({ dir = "gwd" }) end, desc = "File manager in git working directory" }
maps.n["<Leader>ef"] = { function() require("taolf").start({ dir = "fd" }) end, desc = "File manager in open file's working directory" }
end
if f.is_available("mason.nvim") then

View file

@ -6,6 +6,9 @@ M.opts = {
missing = true,
colorscheme = { "tokyonight" },
},
dev = {
path = os.getenv("XDG_DOCUMENTS_DIR") .. "/code/nvim-plugins"
},
ui = {
border = "single",
icons = {

View file

@ -1,25 +1,7 @@
local M = { "lmburns/lf.nvim" }
local tt = require("plugins.misc.toggleterm").opts
local M = { "ssnailed/taolf" }
M.depends = { "toggleterm.nvim" }
M.cmd = { "Lf" }
M.opts = {
default_actions = {
["<C-t>"] = "",
["<C-x>"] = "",
["<C-v>"] = "",
["<C-o>"] = "",
},
mappings = false,
width = tt.float_opts.width,
height = tt.float_opts.height,
winblend = tt.float_opts.winblend,
direction = tt.direction,
border = tt.float_opts.border,
highlights = tt.highlights,
float_opts = tt.float_opts,
}
M.config = true
return M