feat(plugins): add image preview and lazydocker toggle functionality

This commit is contained in:
Prad Nukala committed 2026-06-28 13:54:52 -04:00
1 parent b8f871a954
commit 65f19a0105
3 files changed
+41 -1

No files matched your search

+16
View File
@@ -59,6 +59,8 @@ return {
["<S-CR>"] = "open",
-- Claude Code: add file under cursor to context
["<C-a>"] = function() vim.cmd "ClaudeCodeTreeAdd" end,
-- Preview image under cursor via kitty's icat kitten
["<leader>p"] = "image_kitty",
-- Git keybindings from astrocore
["<C-g>o"] = function() vim.cmd "!gh repo view --web" end,
["<C-g>h"] = function()
@@ -232,6 +234,20 @@ return {
if node.type == "file" then require("neo-tree.command").execute { action = "close" } end
end,
-- Preview an image with kitty's icat kitten in a snacks terminal
image_kitty = function(state)
local node = state.tree:get_node()
if node and node.type == "file" then
require("snacks").terminal("kitten icat --hold " .. vim.fn.shellescape(node.path), {
hidden = true,
auto_close = false,
interactive = true,
})
else
vim.notify("Not a file", vim.log.levels.WARN, { title = "Neo-tree" })
end
end,
-- Custom command to open Mason
mason_open = function() vim.cmd "Mason" end,