Skip to content

Commit c6080c2

Browse files
committed
plugins/copilot-chat: update mappings
1 parent bca825e commit c6080c2

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

plugins/by-name/copilot-chat/default.nix

+16-8
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ helpers.neovim-plugin.mkNeovimPlugin {
258258
mappings =
259259
helpers.defaultNullOpts.mkAttrsOf
260260
(types.submodule {
261+
freeformType = with types; attrsOf anything;
261262
options = {
262263
normal = helpers.mkNullOrStr "Key for normal mode.";
263264

@@ -267,10 +268,7 @@ helpers.neovim-plugin.mkNeovimPlugin {
267268
};
268269
})
269270
{
270-
complete = {
271-
detail = "Use @<Tab> or /<Tab> for options.";
272-
insert = "<Tab>";
273-
};
271+
complete.insert = "<Tab>";
274272
close = {
275273
normal = "q";
276274
insert = "<C-c>";
@@ -281,16 +279,26 @@ helpers.neovim-plugin.mkNeovimPlugin {
281279
};
282280
submit_prompt = {
283281
normal = "<CR>";
284-
insert = "<C-m>";
282+
insert = "<C-s>";
283+
};
284+
toggle_sticky = {
285+
detail = "Makes line under cursor sticky or deletes sticky line.";
286+
normal = "gr";
285287
};
286288
accept_diff = {
287289
normal = "<C-y>";
288290
insert = "<C-y>";
289291
};
290-
yank_diff.normal = "gy";
292+
jump_to_diff.normal = "gj";
293+
quickfix_diffs.normal = "gq";
294+
yank_diff = {
295+
normal = "gy";
296+
register = "\"";
297+
};
291298
show_diff.normal = "gd";
292-
show_system_prompt.normal = "gp";
293-
show_user_selection.normal = "gs";
299+
show_info.normal = "gi";
300+
show_context.normal = "gc";
301+
show_help.normal = "gh";
294302
}
295303
"Mappings for CopilotChat.";
296304
};

tests/test-sources/plugins/by-name/copilot-chat/default.nix

+17-10
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@
7979
zindex = 1;
8080
};
8181
mappings = {
82-
complete = {
83-
detail = "Use @<Tab> or /<Tab> for options.";
84-
insert = "<Tab>";
85-
};
82+
complete.insert = "<Tab>";
8683
close = {
8784
normal = "q";
8885
insert = "<C-c>";
@@ -93,16 +90,26 @@
9390
};
9491
submit_prompt = {
9592
normal = "<CR>";
96-
insert = "<C-m>";
93+
insert = "<C-s>";
94+
};
95+
toggle_sticky = {
96+
detail = "Makes line under cursor sticky or deletes sticky line.";
97+
normal = "gr";
9798
};
9899
accept_diff = {
99100
normal = "<C-y>";
100101
insert = "<C-y>";
101102
};
102-
yank_diff.normal = "gy";
103+
jump_to_diff.normal = "gj";
104+
quickfix_diffs.normal = "gq";
105+
yank_diff = {
106+
normal = "gy";
107+
register = "\"";
108+
};
103109
show_diff.normal = "gd";
104-
show_system_prompt.normal = "gp";
105-
show_user_selection.normal = "gs";
110+
show_info.normal = "gi";
111+
show_context.normal = "gc";
112+
show_help.normal = "gh";
106113
};
107114
};
108115
};
@@ -158,8 +165,8 @@
158165
};
159166
yank_diff.normal = "gmy";
160167
show_diff.normal = "gmd";
161-
show_system_prompt.normal = "gmp";
162-
show_user_selection.normal = "gms";
168+
show_info.normal = "gmp";
169+
show_context.normal = "gms";
163170
};
164171
};
165172
};

0 commit comments

Comments
 (0)