v1.0
This commit is contained in:
parent
a22976111e
commit
f8596bb0c6
16 changed files with 1252 additions and 79 deletions
46
lua/custom/plugins/copilot.lua
Normal file
46
lua/custom/plugins/copilot.lua
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
return {
|
||||
{
|
||||
'CopilotC-Nvim/CopilotChat.nvim',
|
||||
branch = 'canary',
|
||||
dependencies = {
|
||||
{ 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim
|
||||
{ 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper
|
||||
},
|
||||
build = 'make tiktoken', -- Only on MacOS or Linux
|
||||
keys = {
|
||||
{
|
||||
'<leader>ccq',
|
||||
function()
|
||||
local input = vim.fn.input 'Quick Chat: '
|
||||
if input ~= '' then
|
||||
require('CopilotChat').ask(input, { selection = require('CopilotChat.select').buffer })
|
||||
end
|
||||
end,
|
||||
desc = 'CopilotChat Buffer chat',
|
||||
},
|
||||
{
|
||||
'<leader>cct',
|
||||
'<cmd>CopilotChatToggle<CR>',
|
||||
desc = 'Copilot Chat Toggle',
|
||||
},
|
||||
-- {
|
||||
-- '<leader>ccs',
|
||||
-- 'CopilotChatSave',
|
||||
-- desc = 'CopilotChat - Quick chat',
|
||||
-- },
|
||||
},
|
||||
opts = {
|
||||
debug = false, -- Enable debug logging
|
||||
window = {
|
||||
layout = 'float',
|
||||
relative = 'editor',
|
||||
title = 'Copilot',
|
||||
footer = '<C-i> to toggle chat | <C-l> to clean chat',
|
||||
width = 0.6,
|
||||
height = 0.5,
|
||||
row = 0,
|
||||
border = 'rounded', -- 'none', single', 'double', 'rounded', 'solid', 'shadow'
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue