From cc0e5ef8e97ab424d4fe756d053d428d95cbb4aa Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 8 Nov 2024 19:00:02 -0500 Subject: [PATCH] Auto commit: 2024-11-08 19:00:02 --- .config/nvim/lua/plugins/copilot.lua | 19 +++++++++++++++++-- .config/yadm/autoshdpad.log | 2 ++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/plugins/copilot.lua b/.config/nvim/lua/plugins/copilot.lua index 82428823..fa7b43ca 100644 --- a/.config/nvim/lua/plugins/copilot.lua +++ b/.config/nvim/lua/plugins/copilot.lua @@ -18,8 +18,23 @@ return { -- disable by default require("copilot.command").disable() - - LazyVim.toggle.map("at", copilot_toggle) + local cpt = 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, + }) + -- LazyVim.toggle.map("at", copilot_toggle) end, }, { "CopilotC-Nvim/CopilotChat.nvim", opts = { diff --git a/.config/yadm/autoshdpad.log b/.config/yadm/autoshdpad.log index 469cfe05..f7ff6e4b 100644 --- a/.config/yadm/autoshdpad.log +++ b/.config/yadm/autoshdpad.log @@ -100,3 +100,5 @@ [main 87929a5] Auto commit: 2024-11-08 18:50:02 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .config/nvim/lua/plugins/no-neck-pain.lua +[main 19bdcd3] Auto commit: 2024-11-08 18:55:02 + 1 file changed, 3 insertions(+)