File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ local config = {
121
121
chat_finder_pattern = " topic " ,
122
122
-- if true, finished ChatResponder won't move the cursor to the end of the buffer
123
123
chat_free_cursor = false ,
124
+ -- use prompt buftype for chats (:h prompt-buffer)
125
+ chat_prompt_buf_type = false ,
124
126
125
127
-- how to display GpChatToggle or GpContext: popup / split / vsplit / tabnew
126
128
toggle_target = " vsplit" ,
Original file line number Diff line number Diff line change @@ -1401,6 +1401,14 @@ M.prep_chat = function(buf, file_name)
1401
1401
1402
1402
M .prep_md (buf )
1403
1403
1404
+ if M .config .chat_prompt_buf_type then
1405
+ vim .api .nvim_buf_set_option (buf , " buftype" , " prompt" )
1406
+ vim .fn .prompt_setprompt (buf , " " )
1407
+ vim .fn .prompt_setcallback (buf , function ()
1408
+ M .cmd .ChatRespond ({ args = " " })
1409
+ end )
1410
+ end
1411
+
1404
1412
-- setup chat specific commands
1405
1413
local range_commands = {
1406
1414
{
You can’t perform that action at this time.
0 commit comments