Setup
i use LazyVim. I will update this as time goes.
Neotree
For file previews when using Neotree i added the following to my lua/config/autocmds.lua:
require("neo-tree").setup({
window = {
mappings = {
["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } },
},
},
})
Lazygit keymaps
I added the following to my lua/config/keymaps.lua:
local map = vim.keymap.set
map("n", "<leader>gl", function()
LazyVim.lazygit({ cwd = LazyVim.root.git() })
end, { desc = "Lazygit " })
map("n", "<leader>gL", function()
LazyVim.lazygit({ args = { "log" } })
end, { desc = "Lazygit Log (cwd)" })