mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
plugins/diffview: init + test (#457)
This commit is contained in:
parent
6693b63ff7
commit
27bb28f23e
4 changed files with 877 additions and 0 deletions
164
tests/test-sources/plugins/git/diffview.nix
Normal file
164
tests/test-sources/plugins/git/diffview.nix
Normal file
|
@ -0,0 +1,164 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.diffview.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.diffview = {
|
||||
enable = true;
|
||||
|
||||
diffBinaries = true;
|
||||
enhancedDiffHl = true;
|
||||
gitCmd = ["git"];
|
||||
hgCmd = ["hg"];
|
||||
useIcons = false;
|
||||
showHelpHints = false;
|
||||
watchIndex = true;
|
||||
icons = {
|
||||
folderClosed = "a";
|
||||
folderOpen = "b";
|
||||
};
|
||||
signs = {
|
||||
foldClosed = "c";
|
||||
foldOpen = "d";
|
||||
done = "e";
|
||||
};
|
||||
view = {
|
||||
default = {
|
||||
layout = "diff2_horizontal";
|
||||
winbarInfo = true;
|
||||
};
|
||||
mergeTool = {
|
||||
layout = "diff1_plain";
|
||||
disableDiagnostics = false;
|
||||
winbarInfo = false;
|
||||
};
|
||||
fileHistory = {
|
||||
layout = "diff2_vertical";
|
||||
winbarInfo = true;
|
||||
};
|
||||
};
|
||||
filePanel = {
|
||||
listingStyle = "list";
|
||||
treeOptions = {
|
||||
flattenDirs = false;
|
||||
folderStatuses = "never";
|
||||
};
|
||||
winConfig = {
|
||||
position = "right";
|
||||
width = 20;
|
||||
winOpts = {};
|
||||
};
|
||||
};
|
||||
fileHistoryPanel = {
|
||||
logOptions = {
|
||||
git = {
|
||||
singleFile = {
|
||||
base = "a";
|
||||
diffMerges = "combined";
|
||||
};
|
||||
multiFile.diffMerges = "first-parent";
|
||||
};
|
||||
hg = {
|
||||
singleFile = {};
|
||||
multiFile = {};
|
||||
};
|
||||
};
|
||||
winConfig = {
|
||||
position = "top";
|
||||
height = 10;
|
||||
winOpts = {};
|
||||
};
|
||||
};
|
||||
|
||||
commitLogPanel.winConfig.winOpts = {};
|
||||
defaultArgs = {
|
||||
diffviewOpen = ["HEAD"];
|
||||
diffviewFileHistory = ["%"];
|
||||
};
|
||||
hooks = {
|
||||
viewOpened = ''
|
||||
function(view)
|
||||
print(
|
||||
("A new %s was opened on tab page %d!")
|
||||
:format(view.class:name(), view.tabpage)
|
||||
)
|
||||
end
|
||||
'';
|
||||
};
|
||||
keymaps = {
|
||||
view = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
diff1 = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
}
|
||||
];
|
||||
diff2 = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
diff3 = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
diff4 = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
filePanel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
fileHistoryPanel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
optionPanel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
helpPanel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue