feat: Copilot for NvChad

laptop
Elias Almqvist 10 months ago
parent f0572acb27
commit 5cf86f505a
No known key found for this signature in database
GPG Key ID: E31A99CE3E75A158
  1. 10
      nvchad/.config/nvim/lua/custom/mappings.lua
  2. 13
      nvchad/.config/nvim/lua/custom/plugins.lua

@ -22,6 +22,16 @@ M.general = {
["J"] = { ":m '>+1<CR>gv=gv" }, ["J"] = { ":m '>+1<CR>gv=gv" },
["K"] = { ":m '<-2<CR>gv=gv" }, ["K"] = { ":m '<-2<CR>gv=gv" },
}, },
i = {
["<C-l>"] = {
function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end,
"Copilot Accept",
{ replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true },
},
},
} }
-- more keybinds! -- more keybinds!

@ -47,6 +47,19 @@ local plugins = {
end, 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;
vim.g.copilot_tab_fallback = "";
-- The mapping is set to other key, see custom/lua/mappings
-- or run <leader>ch to see copilot mapping section
end
},
-- To make a plugin not be loaded -- To make a plugin not be loaded
-- { -- {
-- "NvChad/nvim-colorizer.lua", -- "NvChad/nvim-colorizer.lua",

Loading…
Cancel
Save