Add Github copilot
This commit is contained in:
parent
383bf939b9
commit
fba13a38bf
2 changed files with 20 additions and 0 deletions
19
lua/custom/plugins/copilot.lua
Normal file
19
lua/custom/plugins/copilot.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
-- Copilot
|
||||
|
||||
return {
|
||||
{
|
||||
"github/copilot.vim",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
-- Optional: enable copilot globally
|
||||
vim.g.copilot_no_tab_map = true
|
||||
vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
|
||||
vim.g.copilot_assume_mapped = true
|
||||
vim.g.copilot_filetypes = {
|
||||
["*"] = true, -- enable for all filetypes
|
||||
["markdown"] = false, -- disable for markdown if desired
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue