plugins.copilot-chat.settings
Options provided to the require('CopilotChat').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
answer_header = "## Copilot ";
auto_follow_cursor = false;
error_header = "## Error ";
mappings = {
close = {
insert = "<C-c>";
normal = "q";
};
complete = {
detail = "Use @<Tab> or /<Tab> for options.";
insert = "<Tab>";
};
};
prompts = {
Explain = "Please explain how the following code works.";
Review = "Please review the following code and provide suggestions for improvement.";
Tests = "Please explain how the selected code works, then generate unit tests for it.";
};
question_header = "## User ";
show_help = false;
}
Declared by:
plugins.copilot-chat.settings.allow_insecure
Allow insecure server connections.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.copilot-chat.settings.answer_header
Header to use for AI answers.
Type: null or string or raw lua code
Default:
null
Plugin default: "## Copilot "
Declared by:
plugins.copilot-chat.settings.auto_follow_cursor
Auto-follow cursor in chat.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.copilot-chat.settings.auto_insert_mode
Automatically enter insert mode when opening window and if auto follow cursor is enabled on new prompt.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.copilot-chat.settings.callback
Callback to use when ask response is received.
fun(response: string, source: CopilotChat.config.source)
Type: null or lua function string
Default:
null
Plugin default: null
Declared by:
plugins.copilot-chat.settings.clear_chat_on_new_prompt
Clears chat on every new prompt.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.copilot-chat.settings.context
Default context to use, "buffers"
, "buffer"
or null
(can be specified manually in prompt via @).
Type: null or one of “buffers”, “buffer” or raw lua code
Default:
null
Plugin default: null
Declared by:
plugins.copilot-chat.settings.debug
Enable debug logging.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.copilot-chat.settings.error_header
Header to use for errors.
Type: null or string or raw lua code
Default:
null
Plugin default: "## Error "
Declared by:
plugins.copilot-chat.settings.highlight_selection
Highlight selection.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.copilot-chat.settings.history_path
Default path to stored history.
Type: null or string or raw lua code
Default:
null
Plugin default:
{
__raw = "vim.fn.stdpath('data') .. '/copilotchat_history'";
}
Declared by:
plugins.copilot-chat.settings.model
GPT model to use, ‘gpt-3.5-turbo’ or ‘gpt-4’.
Type: null or string or raw lua code
Default:
null
Plugin default: "gpt-4"
Declared by:
plugins.copilot-chat.settings.proxy
Custom proxy to use, formatted as [protocol://]host[:port]
.
Type: null or string or raw lua code
Default:
null
Plugin default: null
Declared by:
plugins.copilot-chat.settings.question_header
Header to use for user questions.
Type: null or string or raw lua code
Default:
null
Plugin default: "## User "
Declared by:
plugins.copilot-chat.settings.selection
Default selection (visual or line).
fun(source: CopilotChat.config.source):CopilotChat.config.selection
Type: null or lua function string
Default:
null
Plugin default:
''
function(source)
local select = require('CopilotChat.select')
return select.visual(source) or select.line(source)
end
''
Declared by:
plugins.copilot-chat.settings.separator
Separator to use in chat.
Type: null or string or raw lua code
Default:
null
Plugin default: "───"
Declared by:
plugins.copilot-chat.settings.show_folds
Shows folds for sections in chat.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.copilot-chat.settings.show_help
Shows help message as virtual lines when waiting for user input.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.copilot-chat.settings.system_prompt
System prompt to use.
Type: null or lua code string
Default:
null
Plugin default: "require('CopilotChat.prompts').COPILOT_INSTRUCTIONS"
Declared by:
plugins.copilot-chat.settings.temperature
GPT temperature.
Type: null or integer or floating point number between 0.0 and 1.0 (both inclusive) or raw lua code
Default:
null
Plugin default: 0.1
Declared by: