@@ -262,27 +262,27 @@ Follow the example below to create a simple input for CopilotChat.
262262 {
263263 " CopilotC-Nvim/CopilotChat.nvim" ,
264264 keys =
265- function ()
266- local keybinds = {
267- -- add your custom keybinds here
268- }
269- -- change prompt and keybinds as per your need
270- local my_prompts = {
271- {prompt = " In Neovim." ,desc = " Neovim" ,key = " n" },
272- {prompt = " Help with this" ,desc = " Help" ,key = " h" },
273- {prompt = " Simplify and imporve readablilty" ,desc = " Simplify" ,key = " s" },
274- {prompt = " Optimize the code to improve perfomance and readablilty." ,desc = " Optimize" ,key = " o" },
275- {prompt = " Find possible errors and fix them for me" ,desc = " Fix" ,key = " f" },
276- {prompt = " Explain in detail" ,desc = " Explain" ,key = " e" },
277- {prompt = " Write a shell scirpt" ,desc = " Shell" ,key = " S" },
278- }
279- -- you can change <leader>cc to your desired keybind prefix
280- for _ ,v in pairs (my_prompts ) do
281- table.insert (keybinds ,{ " <leader>cc" .. v .key , " :CopilotChatVisual " .. v .prompt .. " <cr>" , mode = " x" , desc = " CopilotChat - " .. v .desc })
282- table.insert (keybinds ,{ " <leader>cc" .. v .key , " <cmd>CopilotChat " .. v .prompt .. " <cr>" , desc = " CopilotChat - " .. v .desc })
283- end
284- return keybinds
285- end ,
265+ function ()
266+ local keybinds = {
267+ -- add your custom keybinds here
268+ }
269+ -- change prompt and keybinds as per your need
270+ local my_prompts = {
271+ {prompt = " In Neovim." ,desc = " Neovim" ,key = " n" },
272+ {prompt = " Help with this" ,desc = " Help" ,key = " h" },
273+ {prompt = " Simplify and imporve readablilty" ,desc = " Simplify" ,key = " s" },
274+ {prompt = " Optimize the code to improve perfomance and readablilty." ,desc = " Optimize" ,key = " o" },
275+ {prompt = " Find possible errors and fix them for me" ,desc = " Fix" ,key = " f" },
276+ {prompt = " Explain in detail" ,desc = " Explain" ,key = " e" },
277+ {prompt = " Write a shell scirpt" ,desc = " Shell" ,key = " S" },
278+ }
279+ -- you can change <leader>cc to your desired keybind prefix
280+ for _ ,v in pairs (my_prompts ) do
281+ table.insert (keybinds ,{ " <leader>cc" .. v .key , " :CopilotChatVisual " .. v .prompt .. " <cr>" , mode = " x" , desc = " CopilotChat - " .. v .desc })
282+ table.insert (keybinds ,{ " <leader>cc" .. v .key , " <cmd>CopilotChat " .. v .prompt .. " <cr>" , desc = " CopilotChat - " .. v .desc })
283+ end
284+ return keybinds
285+ end ,
286286 },
287287```
288288
0 commit comments