Skip to main content

Copilot-chat

info

You can enable the extra with the :LazyExtras command. Plugins marked as optional will only be configured if they are installed.

Alternatively, you can add it to your lazy.nvim imports
lua/config/lazy.lua
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.coding.copilot-chat" },
{ import = "plugins" },
},
})

Below you can find a list of included plugins and their default settings.

caution

You don't need to copy the default settings to your config. They are only shown here for reference.

CopilotChat.nvim

opts = function()
local user = vim.env.USER or "User"
user = user:sub(1, 1):upper() .. user:sub(2)
return {
model = "gpt-4",
auto_insert_mode = true,
show_help = true,
question_header = " " .. user .. " ",
answer_header = " Copilot ",
window = {
width = 0.4,
},
selection = function(source)
local select = require("CopilotChat.select")
return select.visual(source) or select.buffer(source)
end,
}
end

edgy.nvim (optional)

Edgy integration

opts = function(_, opts)
opts.right = opts.right or {}
table.insert(opts.right, {
ft = "copilot-chat",
title = "Copilot Chat",
size = { width = 50 },
})
end