mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-25 06:38:34 +02:00
Done
This commit is contained in:
parent
3338d39206
commit
edc87670eb
16 changed files with 1096 additions and 13 deletions
32
lua/custom/plugins/copilot.lua
Normal file
32
lua/custom/plugins/copilot.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
-- GitHub Copilot configuration
|
||||
-- https://github.com/github/copilot.vim
|
||||
|
||||
return {
|
||||
"github/copilot.vim",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
-- Disable default mappings
|
||||
vim.g.copilot_no_maps = true
|
||||
|
||||
-- Key mappings
|
||||
vim.keymap.set('i', '<C-j>', 'copilot#Accept("<CR>")', {
|
||||
expr = true,
|
||||
replace_keycodes = false,
|
||||
silent = true,
|
||||
})
|
||||
|
||||
-- Additional keymaps for Copilot
|
||||
vim.keymap.set('i', '<C-l>', '<Plug>(copilot-accept-word)', { silent = true })
|
||||
vim.keymap.set('i', '<C-]>', '<Plug>(copilot-next)', { silent = true })
|
||||
-- Changed from <C-[> to <M-[> (Alt+[) to avoid conflicting with Escape
|
||||
vim.keymap.set('i', '<M-[>', '<Plug>(copilot-previous)', { silent = true })
|
||||
vim.keymap.set('i', '<C-\\>', '<Plug>(copilot-dismiss)', { silent = true })
|
||||
|
||||
-- Additional settings
|
||||
vim.g.copilot_filetypes = {
|
||||
["*"] = true,
|
||||
["markdown"] = true,
|
||||
["help"] = false,
|
||||
}
|
||||
end,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue