@@ -78,33 +78,33 @@ local utils = require('CopilotChat.utils')
7878--- @field callback fun ( response : string , source : CopilotChat.config.source )?
7979--- @field selection nil | fun ( source : CopilotChat.config.source ): CopilotChat.config.selection ?
8080--- @field window CopilotChat.config.window ?
81+ --- @field show_help boolean ?
82+ --- @field show_folds boolean ?
83+ --- @field highlight_selection boolean ?
84+ --- @field highlight_headers boolean ?
85+ --- @field auto_follow_cursor boolean ?
86+ --- @field auto_insert_mode boolean ?
87+ --- @field insert_at_end boolean ?
88+ --- @field clear_chat_on_new_prompt boolean ?
8189
8290--- CopilotChat default configuration
8391--- @class CopilotChat.config : CopilotChat.config.shared
8492--- @field debug boolean ?
8593--- @field log_level string ?
8694--- @field proxy string ?
8795--- @field allow_insecure boolean ?
96+ --- @field chat_autocomplete boolean ?
8897--- @field history_path string ?
8998--- @field question_header string ?
9099--- @field answer_header string ?
91100--- @field error_header string ?
92101--- @field separator string ?
93- --- @field show_folds boolean ?
94- --- @field show_help boolean ?
95- --- @field highlight_selection boolean ?
96- --- @field highlight_headers boolean ?
97- --- @field chat_autocomplete boolean ?
98- --- @field auto_follow_cursor boolean ?
99- --- @field auto_insert_mode boolean ?
100- --- @field insert_at_end boolean ?
101- --- @field clear_chat_on_new_prompt boolean ?
102102--- @field contexts table<string , CopilotChat.config.context> ?
103103--- @field prompts table<string , CopilotChat.config.prompt | string> ?
104104--- @field mappings CopilotChat.config.mappings ?
105105return {
106106
107- -- Shared config starts here (can be passed to functions at runtime)
107+ -- Shared config starts here (can be passed to functions at runtime and configured via setup function )
108108
109109 system_prompt = prompts .COPILOT_INSTRUCTIONS , -- System prompt to use (can be specified manually in prompt via /).
110110 model = ' gpt-4o' , -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
@@ -135,30 +135,30 @@ return {
135135 zindex = 1 , -- determines if window is on top or below other floating windows
136136 },
137137
138+ show_help = true , -- Shows help message as virtual lines when waiting for user input
139+ show_folds = true , -- Shows folds for sections in chat
140+ highlight_selection = true , -- Highlight selection
141+ highlight_headers = true , -- Highlight headers in chat, disable if using markdown renderers (like render-markdown.nvim)
142+ auto_follow_cursor = true , -- Auto-follow cursor in chat
143+ auto_insert_mode = false , -- Automatically enter insert mode when opening window and on new prompt
144+ insert_at_end = false , -- Move cursor to end of buffer when inserting text
145+ clear_chat_on_new_prompt = false , -- Clears chat on every new prompt
146+
138147 -- Static config starts here (can be configured only via setup function)
139148
140149 debug = false , -- Enable debug logging (same as 'log_level = 'debug')
141150 log_level = ' info' , -- Log level to use, 'trace', 'debug', 'info', 'warn', 'error', 'fatal'
142151 proxy = nil , -- [protocol://]host[:port] Use this proxy
143152 allow_insecure = false , -- Allow insecure server connections
153+
154+ chat_autocomplete = true , -- Enable chat autocompletion (when disabled, requires manual `mappings.complete` trigger)
144155 history_path = vim .fn .stdpath (' data' ) .. ' /copilotchat_history' , -- Default path to stored history
145156
146157 question_header = ' ## User ' , -- Header to use for user questions
147158 answer_header = ' ## Copilot ' , -- Header to use for AI answers
148159 error_header = ' ## Error ' , -- Header to use for errors
149160 separator = ' ───' , -- Separator to use in chat
150161
151- show_folds = true , -- Shows folds for sections in chat
152- show_help = true , -- Shows help message as virtual lines when waiting for user input
153- highlight_selection = true , -- Highlight selection
154- highlight_headers = true , -- Highlight headers in chat, disable if using markdown renderers (like render-markdown.nvim)
155-
156- chat_autocomplete = true , -- Enable chat autocompletion (when disabled, requires manual `mappings.complete` trigger)
157- auto_follow_cursor = true , -- Auto-follow cursor in chat
158- auto_insert_mode = false , -- Automatically enter insert mode when opening window and on new prompt
159- insert_at_end = false , -- Move cursor to end of buffer when inserting text
160- clear_chat_on_new_prompt = false , -- Clears chat on every new prompt
161-
162162 -- default contexts
163163 contexts = {
164164 buffer = {
0 commit comments