nvim: add copilot

This commit is contained in:
Daniel Lundin 2022-04-19 09:27:30 +02:00
parent ba0e424d5c
commit 4132f6fabe
2 changed files with 14 additions and 0 deletions

View file

@ -217,4 +217,12 @@ return require('packer').startup(function()
config = function() require("plugins/zenbones") end,
}
-- copilot
use({
"github/copilot.vim",
config = function()
require("plugins/copilot")
end,
})
end)

View file

@ -0,0 +1,6 @@
local map = require("dln.utils").map
map("i", "<C-J>", [[copilot#Accept("\<CR>")]], { noremap = true, silent = true, expr = true, script = true })
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
vim.g.copilot_tab_fallback = ""