mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-08-15 07:23:02 +02:00
feat(plugins): add Copilot and CopilotChat configurations
This commit introduces configurations for GitHub Copilot and Copilot Chat plugins in the Neovim setup. It includes the setup of keybindings for toggling Copilot and various chat functionalities, enhancing the development experience through AI-assisted programming features.
This commit is contained in:
parent
3e168bd0d8
commit
9b7605db11
1 changed files with 37 additions and 0 deletions
|
@ -144,4 +144,41 @@ return {
|
|||
vim.cmd.colorscheme 'gruvbox-material'
|
||||
end,
|
||||
},
|
||||
{
|
||||
'github/copilot.vim',
|
||||
config = function()
|
||||
vim.cmd [[Copilot disable]]
|
||||
|
||||
-- Keybinding to toggle Copilot
|
||||
vim.keymap.set('n', '<leader>cp', function()
|
||||
vim.cmd [[Copilot toggle]]
|
||||
end, { noremap = true, silent = true, desc = 'Toggle Copilot' })
|
||||
end,
|
||||
},
|
||||
{
|
||||
'CopilotC-Nvim/CopilotChat.nvim',
|
||||
dependencies = {
|
||||
{ 'github/copilot.vim' }, -- or zbirenbaum/copilot.lua
|
||||
{ 'nvim-lua/plenary.nvim', branch = 'master' }, -- for curl, log and async functions
|
||||
},
|
||||
build = 'make tiktoken', -- Only on MacOS or Linux
|
||||
opts = {
|
||||
-- See Configuration section for options
|
||||
},
|
||||
config = function()
|
||||
local chat = require 'CopilotChat'
|
||||
chat.setup()
|
||||
vim.keymap.set({ 'n' }, '<leader>aa', chat.toggle, { desc = 'AI Toggle' })
|
||||
vim.keymap.set({ 'v' }, '<leader>aa', chat.open, { desc = 'AI Open' })
|
||||
vim.keymap.set({ 'n' }, '<leader>ax', chat.reset, { desc = 'AI Reset' })
|
||||
vim.keymap.set({ 'n' }, '<leader>as', chat.stop, { desc = 'AI Stop' })
|
||||
vim.keymap.set({ 'n' }, '<leader>am', chat.select_model, { desc = 'AI Model' })
|
||||
vim.keymap.set('n', '<leader>ar', ':CopilotChatFix<CR>', { desc = 'AI Fix' })
|
||||
|
||||
vim.keymap.set('n', '<leader>at', ':CopilotChatTests<CR>', { desc = 'AI Tests' })
|
||||
vim.keymap.set('n', '<leader>ad', ':CopilotChatDocs<CR>', { desc = 'AI Docs' })
|
||||
vim.keymap.set('n', '<leader>ar', ':CopilotChatReview<CR>', { desc = 'AI Review' })
|
||||
end,
|
||||
-- See Commands section for default commands if you want to lazy load on them
|
||||
},
|
||||
} -- end of return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue