Skip to content

Instantly share code, notes, and snippets.

@andostronaut
Last active February 15, 2025 06:10
Show Gist options
  • Save andostronaut/3b471651d1f808659f7ecca54e77cfb3 to your computer and use it in GitHub Desktop.
Save andostronaut/3b471651d1f808659f7ecca54e77cfb3 to your computer and use it in GitHub Desktop.
Github Copilot - Neovim Setup
{
"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
vim.g.copilot_filetypes = {
["*"] = true,
["mdx"] = true,
}
end,
}
M.copilot = {
i = {
["<leader>a"] = {
function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end,
"Copilot Accept",
{ replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true },
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment