nvim/lua/plugins/undotree.lua

16 lines
573 B
Lua

-- Phase 6.8: undotree for visual undo history
return {
'mbbill/undotree',
cmd = 'UndotreeToggle', -- Lazy load on command
keys = {
{ '<leader>u', '<cmd>UndotreeToggle<cr>', desc = 'Undotree: Toggle undo tree' },
},
config = function()
-- Configure undotree
vim.g.undotree_WindowLayout = 2 -- Layout: diff at bottom
vim.g.undotree_ShortIndicators = 1 -- Use short time indicators
vim.g.undotree_SetFocusWhenToggle = 1 -- Focus undotree when toggled
vim.g.undotree_DiffAutoOpen = 1 -- Auto open diff window
end,
}