mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-15 21:41:11 +01:00
plugins/diffview: migrate to mkNeovimPlugin
This commit is contained in:
parent
37451a5882
commit
dc8dea66e8
3 changed files with 563 additions and 961 deletions
|
|
@ -9,157 +9,159 @@
|
|||
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;
|
||||
settings = {
|
||||
diff_binaries = true;
|
||||
enhanced_diff_hl = true;
|
||||
git_cmd = [ "git" ];
|
||||
hg_cmd = [ "hg" ];
|
||||
use_icons = false;
|
||||
show_help_hints = false;
|
||||
watch_index = true;
|
||||
icons = {
|
||||
folder_closed = "a";
|
||||
folder_open = "b";
|
||||
};
|
||||
mergeTool = {
|
||||
layout = "diff1_plain";
|
||||
disableDiagnostics = false;
|
||||
winbarInfo = false;
|
||||
signs = {
|
||||
fold_closed = "c";
|
||||
fold_open = "d";
|
||||
done = "e";
|
||||
};
|
||||
fileHistory = {
|
||||
layout = "diff2_vertical";
|
||||
winbarInfo = true;
|
||||
view = {
|
||||
default = {
|
||||
layout = "diff2_horizontal";
|
||||
winbar_info = true;
|
||||
};
|
||||
merge_tool = {
|
||||
layout = "diff1_plain";
|
||||
disable_diagnostics = false;
|
||||
winbar_info = false;
|
||||
};
|
||||
file_history = {
|
||||
layout = "diff2_vertical";
|
||||
winbar_info = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
filePanel = {
|
||||
listingStyle = "list";
|
||||
treeOptions = {
|
||||
flattenDirs = false;
|
||||
folderStatuses = "never";
|
||||
file_panel = {
|
||||
listing_style = "list";
|
||||
tree_options = {
|
||||
flatten_dirs = false;
|
||||
folder_statuses = "never";
|
||||
};
|
||||
win_config = {
|
||||
position = "right";
|
||||
width = 20;
|
||||
win_opts = { };
|
||||
};
|
||||
};
|
||||
winConfig = {
|
||||
position = "right";
|
||||
width = 20;
|
||||
winOpts = { };
|
||||
};
|
||||
};
|
||||
fileHistoryPanel = {
|
||||
logOptions = {
|
||||
git = {
|
||||
singleFile = {
|
||||
base = "a";
|
||||
diffMerges = "combined";
|
||||
file_history_panel = {
|
||||
log_options = {
|
||||
git = {
|
||||
single_file = {
|
||||
base = "a";
|
||||
diff_merges = "combined";
|
||||
};
|
||||
multi_file.diff_merges = "first-parent";
|
||||
};
|
||||
hg = {
|
||||
single_file = { };
|
||||
multi_file = { };
|
||||
};
|
||||
multiFile.diffMerges = "first-parent";
|
||||
};
|
||||
hg = {
|
||||
singleFile = { };
|
||||
multiFile = { };
|
||||
win_config = {
|
||||
position = "top";
|
||||
height = 10;
|
||||
win_opts = { };
|
||||
};
|
||||
};
|
||||
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";
|
||||
}
|
||||
];
|
||||
commit_log_panel.win_config.win_opts = { };
|
||||
default_args = {
|
||||
DiffviewOpen = [ "HEAD" ];
|
||||
DiffviewFileHistory = [ "%" ];
|
||||
};
|
||||
hooks = {
|
||||
view_opened = ''
|
||||
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";
|
||||
}
|
||||
];
|
||||
file_panel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
file_history_panel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
option_panel = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<tab>";
|
||||
action = "actions.select_next_entry";
|
||||
description = "Open the diff for the next file";
|
||||
}
|
||||
];
|
||||
help_panel = [
|
||||
{
|
||||
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