nvim: add copilot
This commit is contained in:
parent
ba0e424d5c
commit
4132f6fabe
2 changed files with 14 additions and 0 deletions
|
@ -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)
|
||||
|
|
6
.config/nvim/lua/plugins/copilot.lua
Normal file
6
.config/nvim/lua/plugins/copilot.lua
Normal 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 = ""
|
Loading…
Reference in a new issue