plugins/copilot-chat: update mappings

This commit is contained in:
Gaetan Lepage 2024-12-06 11:20:06 +01:00
parent bca825e518
commit c6080c206e
2 changed files with 33 additions and 18 deletions

View file

@ -258,6 +258,7 @@ helpers.neovim-plugin.mkNeovimPlugin {
mappings = mappings =
helpers.defaultNullOpts.mkAttrsOf helpers.defaultNullOpts.mkAttrsOf
(types.submodule { (types.submodule {
freeformType = with types; attrsOf anything;
options = { options = {
normal = helpers.mkNullOrStr "Key for normal mode."; normal = helpers.mkNullOrStr "Key for normal mode.";
@ -267,10 +268,7 @@ helpers.neovim-plugin.mkNeovimPlugin {
}; };
}) })
{ {
complete = { complete.insert = "<Tab>";
detail = "Use @<Tab> or /<Tab> for options.";
insert = "<Tab>";
};
close = { close = {
normal = "q"; normal = "q";
insert = "<C-c>"; insert = "<C-c>";
@ -281,16 +279,26 @@ helpers.neovim-plugin.mkNeovimPlugin {
}; };
submit_prompt = { submit_prompt = {
normal = "<CR>"; normal = "<CR>";
insert = "<C-m>"; insert = "<C-s>";
};
toggle_sticky = {
detail = "Makes line under cursor sticky or deletes sticky line.";
normal = "gr";
}; };
accept_diff = { accept_diff = {
normal = "<C-y>"; normal = "<C-y>";
insert = "<C-y>"; insert = "<C-y>";
}; };
yank_diff.normal = "gy"; jump_to_diff.normal = "gj";
quickfix_diffs.normal = "gq";
yank_diff = {
normal = "gy";
register = "\"";
};
show_diff.normal = "gd"; show_diff.normal = "gd";
show_system_prompt.normal = "gp"; show_info.normal = "gi";
show_user_selection.normal = "gs"; show_context.normal = "gc";
show_help.normal = "gh";
} }
"Mappings for CopilotChat."; "Mappings for CopilotChat.";
}; };

View file

@ -79,10 +79,7 @@
zindex = 1; zindex = 1;
}; };
mappings = { mappings = {
complete = { complete.insert = "<Tab>";
detail = "Use @<Tab> or /<Tab> for options.";
insert = "<Tab>";
};
close = { close = {
normal = "q"; normal = "q";
insert = "<C-c>"; insert = "<C-c>";
@ -93,16 +90,26 @@
}; };
submit_prompt = { submit_prompt = {
normal = "<CR>"; normal = "<CR>";
insert = "<C-m>"; insert = "<C-s>";
};
toggle_sticky = {
detail = "Makes line under cursor sticky or deletes sticky line.";
normal = "gr";
}; };
accept_diff = { accept_diff = {
normal = "<C-y>"; normal = "<C-y>";
insert = "<C-y>"; insert = "<C-y>";
}; };
yank_diff.normal = "gy"; jump_to_diff.normal = "gj";
quickfix_diffs.normal = "gq";
yank_diff = {
normal = "gy";
register = "\"";
};
show_diff.normal = "gd"; show_diff.normal = "gd";
show_system_prompt.normal = "gp"; show_info.normal = "gi";
show_user_selection.normal = "gs"; show_context.normal = "gc";
show_help.normal = "gh";
}; };
}; };
}; };
@ -158,8 +165,8 @@
}; };
yank_diff.normal = "gmy"; yank_diff.normal = "gmy";
show_diff.normal = "gmd"; show_diff.normal = "gmd";
show_system_prompt.normal = "gmp"; show_info.normal = "gmp";
show_user_selection.normal = "gms"; show_context.normal = "gms";
}; };
}; };
}; };