added copilot chat

This commit is contained in:
Jannik Donker
2024-11-07 09:05:54 +01:00
parent a6e6a693b3
commit 5be7301e24
2 changed files with 32 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"CopilotChat.nvim": { "branch": "canary", "commit": "18d51754e9dc87d6b85f1e331c1fca0825384517" },
"LuaSnip": { "branch": "master", "commit": "787dee55ca364cc9119787165418fe93b74c1842" },
"catppuccin": { "branch": "main", "commit": "d9ee9a35f46f0a2bda9a15b5a763fee4095428fd" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
+31
View File
@@ -0,0 +1,31 @@
return {
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "canary",
dependencies = {
{ "github/copilot.vim" }, -- or github/copilot.vim
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
},
build = "make tiktoken", -- Only on MacOS or Linux
opts = {
debug = true, -- Enable debugging
-- default window options
window = {
layout = "float", -- 'vertical', 'horizontal', 'float', 'replace'
width = 0.8, -- fractional width of parent, or absolute width in columns when > 1
height = 0.8, -- fractional height of parent, or absolute height in rows when > 1
-- Options below only apply to floating windows
relative = "editor", -- 'editor', 'win', 'cursor', 'mouse'
border = "single", -- 'none', single', 'double', 'rounded', 'solid', 'shadow'
row = nil, -- row position of the window, default is centered
col = nil, -- column position of the window, default is centered
title = "Copilot Chat", -- title of chat window
footer = nil, -- footer of chat window
zindex = 1, -- determines if window is on top or below other floating windows
},
},
vim.api.nvim_set_keymap("n", "<leader>gh", ":CopilotChatToggle<CR>", { noremap = true, silent = true }),
vim.api.nvim_set_keymap("n", "<leader>gr", ":CopilotChatReset<CR>", { noremap = true, silent = true }),
-- See Commands section for default commands if you want to lazy load on them
},
}