init.lua/lua/plugins/copilot.lua(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
local enabled = false
---@type LazySpec
return {
enabled = enabled,
{
"zbirenbaum/copilot.lua",
enabled = enabled,
cmd = "Copilot",
build = ":Copilot auth",
opts = {
suggestion = { enabled = false },
panel = {
enabled = false,
auto_refresh = true,
keymap = { refresh = "<C-r>" },
layout = {
position = "right",
ratio = 0.3,
},
},
filetypes = {
yaml = true,
TelescopePrompt = false,
["."] = false,
},
},
},
{
"CopilotC-Nvim/CopilotChat.nvim",
dependencies = { "copilot.lua" },
enabled = enabled,
branch = "canary",
cmd = { "CopilotChat" },
build = "make tiktoken",
keys = {
{ "<leader>C", ":CopilotChat ", mode = { "n", "v" } },
},
opts = {
mappings = {
reset = {
insert = "<C-r>",
normal = "<C-r>",
},
submit_prompt = {
insert = "<C-CR>",
},
},
},
},
{
"zbirenbaum/copilot-cmp",
dependencies = { "copilot.lua", "nvim-cmp" },
enabled = enabled,
opts = {},
},
}
|