47 lines
1.2 KiB
Lua
47 lines
1.2 KiB
Lua
plugin({
|
|
lazy = false,
|
|
"CopilotC-Nvim/CopilotChat.nvim",
|
|
dependencies = {
|
|
{ "zbirenbaum/copilot.lua" }, -- or zbirenbaum/copilot.lua
|
|
{ "nvim-lua/plenary.nvim", branch = "master" }, -- for curl, log and async functions
|
|
},
|
|
build = "make tiktoken", -- Only on MacOS or Linux
|
|
opts = {
|
|
-- See Configuration section for options
|
|
},
|
|
-- See Commands section for default commands if you want to lazy load on them
|
|
})
|
|
plugin({
|
|
"zbirenbaum/copilot.lua",
|
|
cmd = "Copilot",
|
|
event = "InsertEnter",
|
|
config = function()
|
|
require("copilot").setup({
|
|
suggestion = { enabled = true },
|
|
panel = { enabled = false },
|
|
})
|
|
end,
|
|
})
|
|
plugin({
|
|
"giuxtaposition/blink-cmp-copilot",
|
|
dependencies = {
|
|
{ "zbirenbaum/copilot.lua" },
|
|
},
|
|
})
|
|
|
|
map("n", "<leader>ac", function()
|
|
require("CopilotChat").open()
|
|
end, { desc = "Copilot chat" })
|
|
|
|
map("n", "<leader>ap", function()
|
|
require("copilot.panel").open()
|
|
end, { desc = "Copilot chat" })
|
|
|
|
map("v", "<leader>ad", function()
|
|
require("CopilotChat").ask("Create documentation for this code")
|
|
end, { desc = "Copilot chat" })
|
|
|
|
map("v", "<leader>at", function()
|
|
require("CopilotChat").ask("#buffer:active Write tests for this code")
|
|
end, { desc = "Copilot chat" })
|