AutoYADM commit: 2024-12-13 17:15:01

This commit is contained in:
Daniel Fichtinger 2024-12-13 17:15:01 -05:00
parent ef96c8de23
commit d7a9f451cc
2 changed files with 77 additions and 5 deletions

View file

@ -1,7 +1,5 @@
{ {
"extras": [ "extras": [
"lazyvim.plugins.extras.ai.copilot",
"lazyvim.plugins.extras.ai.copilot-chat",
"lazyvim.plugins.extras.coding.mini-comment", "lazyvim.plugins.extras.coding.mini-comment",
"lazyvim.plugins.extras.coding.mini-surround", "lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.coding.yanky", "lazyvim.plugins.extras.coding.yanky",

View file

@ -1,3 +1,11 @@
local chat_opts = {
auto_insert_mode = false,
question_header = " Fic",
answer_header = " Copilot ",
window = {
width = 0.4,
},
}
return { return {
{ {
"zbirenbaum/copilot-cmp", "zbirenbaum/copilot-cmp",
@ -23,7 +31,73 @@ return {
-- Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" }) -- Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" })
end, end,
}, },
{ "CopilotC-Nvim/CopilotChat.nvim", opts = { {
auto_insert_mode = false, "CopilotC-Nvim/CopilotChat.nvim",
} }, branch = "main",
cmd = "CopilotChat",
keys = {
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
{
"<leader>aa",
function()
return require("CopilotChat").toggle()
end,
desc = "Toggle (CopilotChat)",
mode = { "n", "v" },
},
{
"<leader>ax",
function()
return require("CopilotChat").reset()
end,
desc = "Clear (CopilotChat)",
mode = { "n", "v" },
},
{
"<leader>aq",
function()
local input = vim.fn.input("Quick Chat: ")
if input ~= "" then
require("CopilotChat").ask(input)
end
end,
desc = "Quick Chat (CopilotChat)",
mode = { "n", "v" },
},
-- Show prompts actions with telescope
-- { "<leader>ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
config = function()
local chat = require("CopilotChat")
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "copilot-chat",
callback = function()
vim.opt_local.relativenumber = false
vim.opt_local.number = false
vim.opt_local.spell = false
end,
})
chat.setup(chat_opts)
end,
},
},
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
build = ":Copilot auth",
-- event = "Buf",
lazy = true,
opts = {
suggestion = {
enabled = false,
},
panel = { enabled = false },
filetypes = {
markdown = true,
help = true,
},
},
},
} }