AutoYADM commit: 2024-12-13 17:30:02
This commit is contained in:
parent
d7a9f451cc
commit
d476bf0bfa
2 changed files with 43 additions and 60 deletions
|
@ -36,9 +36,9 @@ return {
|
||||||
-- enabled = false,
|
-- enabled = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sources = {
|
-- sources = {
|
||||||
default = { "lsp", "path", "snippets", "buffer" },
|
-- default = { "lsp", "path", "snippets", "buffer" },
|
||||||
},
|
-- },
|
||||||
|
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "default",
|
preset = "default",
|
||||||
|
|
|
@ -1,40 +1,36 @@
|
||||||
local chat_opts = {
|
local chat_opts = {
|
||||||
auto_insert_mode = false,
|
auto_insert_mode = false,
|
||||||
question_header = " Fic",
|
question_header = " Me ",
|
||||||
answer_header = " Copilot ",
|
answer_header = " Copilot ",
|
||||||
window = {
|
window = {
|
||||||
width = 0.4,
|
width = 0.4,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
"zbirenbaum/copilot-cmp",
|
|
||||||
enabled = false,
|
|
||||||
opts = function()
|
|
||||||
-- require("copilot.command").disable()
|
|
||||||
-- local cptoggle = Snacks.toggle.new({
|
|
||||||
-- name = "Copilot",
|
|
||||||
-- -- map = vim.keymap.set,
|
|
||||||
-- which_key = true,
|
|
||||||
-- get = function()
|
|
||||||
-- return not require("copilot.client").is_disabled()
|
|
||||||
-- end,
|
|
||||||
-- notify = true,
|
|
||||||
-- set = function(state)
|
|
||||||
-- if state then
|
|
||||||
-- require("copilot.command").enable()
|
|
||||||
-- else
|
|
||||||
-- require("copilot.command").disable()
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
-- Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"CopilotC-Nvim/CopilotChat.nvim",
|
"CopilotC-Nvim/CopilotChat.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
build = ":Copilot auth",
|
||||||
|
-- event = "Buf",
|
||||||
|
lazy = true,
|
||||||
|
opts = {
|
||||||
|
suggestion = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
panel = { enabled = false },
|
||||||
|
filetypes = {
|
||||||
|
markdown = true,
|
||||||
|
help = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
branch = "main",
|
branch = "main",
|
||||||
cmd = "CopilotChat",
|
cmd = "CopilotChat",
|
||||||
|
opts = chat_opts,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
|
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
|
||||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||||
|
@ -66,10 +62,16 @@ return {
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
},
|
},
|
||||||
-- Show prompts actions with telescope
|
-- Show prompts actions with telescope
|
||||||
-- { "<leader>ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
|
-- CURRENTLY BROKEN!!!!!!!!
|
||||||
config = function()
|
-- {
|
||||||
|
-- "<leader>ap",
|
||||||
|
-- require("CopilotChat").pick("prompt"),
|
||||||
|
-- desc = "Prompt Actions (CopilotChat)",
|
||||||
|
-- mode = { "n", "v" },
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
local chat = require("CopilotChat")
|
local chat = require("CopilotChat")
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
pattern = "copilot-chat",
|
pattern = "copilot-chat",
|
||||||
callback = function()
|
callback = function()
|
||||||
|
@ -78,26 +80,7 @@ return {
|
||||||
vim.opt_local.spell = false
|
vim.opt_local.spell = false
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
chat.setup(opts)
|
||||||
chat.setup(chat_opts)
|
|
||||||
end,
|
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