Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
feat: add CopilotChatToggleLayout
Browse files Browse the repository at this point in the history
chore: fix lint
  • Loading branch information
jellydn committed Jan 29, 2024
1 parent 2dbf250 commit 07988b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/CopilotChat/init.lua
Expand Up @@ -23,6 +23,15 @@ M.setup = function(options)
vim.cmd('CopilotChat ' .. value)
end, { nargs = '*', range = true })
end

-- Toggle between newbuffer and split
utils.create_cmd('CopilotChatToggleLayout', function()
if vim.g.copilot_chat_view_option == 'newbuffer' then
vim.g.copilot_chat_view_option = 'split'
else
vim.g.copilot_chat_view_option = 'newbuffer'
end
end, { nargs = '*', range = true })
end

return M

0 comments on commit 07988b9

Please sign in to comment.