nixvim-config/plugins/diffview.nix

24 lines
482 B
Nix

{ ... }:
{
programs.nixvim = {
keymaps = [
{
mode = [ "n" ];
key = ",d";
## @TODO: This doesn't work
action = ''
function()
if next(require('diffview.lib').views) == nil then
vim.cmd('DiffviewOpen origin')
else
vim.cmd('DiffviewClose')
end
end
'';
options = { noremap = true; };
}
];
plugins.diffview.enable = true;
};
}