undotree
This commit is contained in:
parent
c70b7a2540
commit
5fac000ddb
2 changed files with 28 additions and 0 deletions
20
lua/configs/undotree.lua
Normal file
20
lua/configs/undotree.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
vim.cmd [[
|
||||
let g:undotree_WindowLayout=2
|
||||
let g:undotree_DiffpanelHeight=8
|
||||
" let g:undotree_DiffCommand = "delta"
|
||||
|
||||
if has("persistent_undo")
|
||||
let target_path = expand('~/.undodir')
|
||||
|
||||
" create the directory and any parent directories
|
||||
" if the location does not exist.
|
||||
if !isdirectory(target_path)
|
||||
call mkdir(target_path, "p", 0700)
|
||||
endif
|
||||
|
||||
let &undodir=target_path
|
||||
set undofile
|
||||
endif
|
||||
]]
|
||||
|
||||
vim.keymap.set('n', '<leader>tu', vim.cmd.UndotreeToggle, {})
|
|
@ -1,4 +1,12 @@
|
|||
return {
|
||||
{
|
||||
"mbbill/undotree",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require "configs.undotree"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
|
|
Loading…
Reference in a new issue