feat: github copilot intergration

This commit is contained in:
2024-12-31 12:55:08 +01:00
parent 2eb6e7ec6f
commit 223ebb264b
2 changed files with 15 additions and 0 deletions

View File

@@ -7,4 +7,8 @@ local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("i", "<C-l>", function ()
vim.fn.feedkeys(vim.fn['copilot#Accept'](), '')
end, { desc = "Copilot Accept", noremap = true, silent = true })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")

View File

@@ -18,6 +18,17 @@ return {
end,
},
{
"github/copilot.vim",
lazy = false,
config = function() -- Mapping tab is already used by NvChad
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
-- The mapping is set to other key, see custom/lua/mappings
-- or run <leader>ch to see copilot mapping section
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = {