mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-04 01:37:16 +00:00
modules/visuals: add highlight-undo
a plugin for highlighting undo/redo targets
This commit is contained in:
parent
d7cf84c514
commit
c353329620
5 changed files with 70 additions and 1 deletions
|
|
@ -118,5 +118,30 @@ in {
|
|||
}
|
||||
'';
|
||||
})
|
||||
|
||||
(mkIf cfg.highlight-undo.enable {
|
||||
vim.startPlugins = ["highlight-undo"];
|
||||
vim.luaConfigRC.fidget-nvim = nvim.dag.entryAnywhere ''
|
||||
require('highlight-undo').setup({
|
||||
duration = ${toString cfg.highlight-undo.duration},
|
||||
highlight_for_count = ${boolToString cfg.highlight-undo.highlightForCount},
|
||||
undo = {
|
||||
hlgroup = ${cfg.highlight-undo.undo.hlGroup},
|
||||
mode = 'n',
|
||||
lhs = 'u',
|
||||
map = 'undo',
|
||||
opts = {}
|
||||
},
|
||||
|
||||
redo = {
|
||||
hlgroup = ${cfg.highlight-undo.redo.hlGroup},
|
||||
mode = 'n',
|
||||
lhs = '<C-r>',
|
||||
map = 'redo',
|
||||
opts = {}
|
||||
},
|
||||
})
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue