initial commit
This commit is contained in:
46
lua/_copilot.lua
Normal file
46
lua/_copilot.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
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" })
|
||||
Reference in New Issue
Block a user