From b341a4276230cadad01ec1eac8b72d8e79f89c41 Mon Sep 17 00:00:00 2001
From: km <km@grogg.org>
Date: Wed, 4 Dec 2024 16:38:47 +0000
Subject: [PATCH] add copilot change chatgpt input from C-CR to C-s (otherwise
 trapped by Windows terminal)

---
 init.lua                | 1 +
 lua/plugins/chatgpt.lua | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/init.lua b/init.lua
index bb629c5d..c0e7ae41 100644
--- a/init.lua
+++ b/init.lua
@@ -661,6 +661,7 @@ require('lazy').setup({
       'hrsh7th/cmp-nvim-lsp',
       'hrsh7th/cmp-path',
     },
+    'github/copilot.vim',
     config = function()
       -- See `:help cmp`
       local cmp = require 'cmp'
diff --git a/lua/plugins/chatgpt.lua b/lua/plugins/chatgpt.lua
index 1fa09517..c39283d3 100644
--- a/lua/plugins/chatgpt.lua
+++ b/lua/plugins/chatgpt.lua
@@ -4,6 +4,10 @@ return {
   config = function()
     require('chatgpt').setup {
       -- this config assumes you have OPENAI_API_KEY environment variable set
+      popup_input = {
+        submit = '<C-s>',
+      },
+
       openai_params = {
         -- NOTE: model can be a function returning the model name
         -- this is useful if you want to change the model on the fly