AutoYADM commit: 2024-12-13 17:15:01
This commit is contained in:
parent
ef96c8de23
commit
d7a9f451cc
2 changed files with 77 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
|||
local chat_opts = {
|
||||
auto_insert_mode = false,
|
||||
question_header = " Fic",
|
||||
answer_header = " Copilot ",
|
||||
window = {
|
||||
width = 0.4,
|
||||
},
|
||||
}
|
||||
return {
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
|
@ -23,7 +31,73 @@ return {
|
|||
-- Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" })
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue