From bba4fbbbb12c27ecd1a9230dbefc7305f9833353 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sat, 10 Aug 2024 07:45:21 +0200 Subject: [PATCH] Disable LLM triggers by default --- lua/keymaps.lua | 13 +++++++++++++ lua/plugins/copilot.lua | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 3f272f3..7b5c7b1 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -77,4 +77,17 @@ vim.keymap.set('n', 'd', 'tabclose', { desc = 'Close Tab' vim.keymap.set('n', ']', 'tabnext', { desc = 'Next Tab' }) vim.keymap.set('n', '[', 'tabprevious', { desc = 'Previous Tab' }) +-- Toggle LLM Suggestions +vim.keymap.set('n', 'tt', function() + local cp = require 'copilot.suggestion' + + cp.toggle_auto_trigger() + + if vim.b.copilot_suggestion_auto_trigger then + vim.notify 'Suggestions Enabled' + else + vim.notify 'Suggestions Disabled' + end +end, { desc = '[T]oggle LLM Suggestion Auto-[T]rigger' }) + -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 0a6e77f..446c719 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -25,7 +25,7 @@ return { }, suggestion = { enabled = true, - auto_trigger = true, + auto_trigger = false, debounce = 75, keymap = { accept = '',