From 4132f6fabed789733aee896932a4ca5d489c8fef Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 19 Apr 2022 09:27:30 +0200 Subject: [PATCH] nvim: add copilot --- .config/nvim/lua/plugins.lua | 8 ++++++++ .config/nvim/lua/plugins/copilot.lua | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 .config/nvim/lua/plugins/copilot.lua diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 71044ae..c3993be 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -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) diff --git a/.config/nvim/lua/plugins/copilot.lua b/.config/nvim/lua/plugins/copilot.lua new file mode 100644 index 0000000..de59b37 --- /dev/null +++ b/.config/nvim/lua/plugins/copilot.lua @@ -0,0 +1,6 @@ +local map = require("dln.utils").map +map("i", "", [[copilot#Accept("\")]], { 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 = ""