Auto commit: 2024-11-08 19:05:02
This commit is contained in:
parent
cc0e5ef8e9
commit
287902b473
3 changed files with 19 additions and 16 deletions
|
@ -2,25 +2,24 @@ return {
|
|||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
opts = function()
|
||||
local copilot_toggle = require("lazyvim.util.toggle").wrap({
|
||||
name = "Copilot Completion",
|
||||
get = function()
|
||||
return not require("copilot.client").is_disabled()
|
||||
end,
|
||||
set = function(state)
|
||||
if state then
|
||||
require("copilot.command").enable()
|
||||
else
|
||||
require("copilot.command").disable()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- local copilot_toggle = require("lazyvim.util.toggle").wrap({
|
||||
-- name = "Copilot Completion",
|
||||
-- get = function()
|
||||
-- return not require("copilot.client").is_disabled()
|
||||
-- end,
|
||||
-- set = function(state)
|
||||
-- if state then
|
||||
-- require("copilot.command").enable()
|
||||
-- else
|
||||
-- require("copilot.command").disable()
|
||||
-- end
|
||||
-- end,
|
||||
-- })
|
||||
-- disable by default
|
||||
require("copilot.command").disable()
|
||||
local cpt = Snacks.toggle.new({
|
||||
local cptoggle = Snacks.toggle.new({
|
||||
name = "Copilot",
|
||||
map = vim.keymap.set,
|
||||
-- map = vim.keymap.set,
|
||||
which_key = true,
|
||||
get = function()
|
||||
return not require("copilot.client").is_disabled()
|
||||
|
@ -34,6 +33,7 @@ return {
|
|||
end
|
||||
end,
|
||||
})
|
||||
Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" })
|
||||
-- LazyVim.toggle.map("<leader>at", copilot_toggle)
|
||||
end,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue