Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ Below are all available configuration options with their default values:
show_help = true, -- Shows help message as virtual lines when waiting for user input
show_folds = true, -- Shows folds for sections in chat
highlight_selection = true, -- Highlight selection
highlight_headers = true, -- Highlight headers in chat, disable if using markdown renderers (like render-markdown.nvim)
highlight_headers = true, -- Highlight headers in chat
auto_follow_cursor = true, -- Auto-follow cursor in chat
auto_insert_mode = false, -- Automatically enter insert mode when opening window and on new prompt
insert_at_end = false, -- Move cursor to end of buffer when inserting text
Expand Down
2 changes: 1 addition & 1 deletion lua/CopilotChat/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ return {
show_help = true, -- Shows help message as virtual lines when waiting for user input
show_folds = true, -- Shows folds for sections in chat
highlight_selection = true, -- Highlight selection
highlight_headers = true, -- Highlight headers in chat, disable if using markdown renderers (like render-markdown.nvim)
highlight_headers = true, -- Highlight headers in chat
auto_follow_cursor = true, -- Auto-follow cursor in chat
auto_insert_mode = false, -- Automatically enter insert mode when opening window and on new prompt
insert_at_end = false, -- Move cursor to end of buffer when inserting text
Expand Down
10 changes: 9 additions & 1 deletion lua/CopilotChat/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,8 @@ end
--- Set up the plugin
---@param config CopilotChat.config.Config?
function M.setup(config)
M.config = vim.tbl_deep_extend('force', require('CopilotChat.config'), config or {})
local default_config = require('CopilotChat.config')
M.config = vim.tbl_deep_extend('force', default_config, config or {})
state.highlights_loaded = false

-- Save proxy and insecure settings
Expand All @@ -1181,6 +1182,13 @@ function M.setup(config)
M.log_level(M.config.log_level)
end

if not M.config.separator or M.config.separator == '' then
log.warn(
'Empty separator is not allowed, using default separator instead. Set `separator` in config to change this.'
)
M.config.separator = default_config.separator
end

if M.chat then
M.chat:close(state.source and state.source.bufnr or nil)
M.chat:delete()
Expand Down
Loading