Update with main #1

Merged
jiriks74 merged 4 commits from main into merlin 2022-10-30 00:07:32 +02:00
2 changed files with 30 additions and 2 deletions
Showing only changes of commit e6d978fc38 - Show all commits

@ -1,3 +1,6 @@
local cmp = require('cmp')
-- Never gonna give you up
-- Never gonna
-- AstroNvim Configuration Table
-- All configuration changes should go inside of the table below
@ -271,7 +274,7 @@ local config = {
-- ["<esc>"] = false,
},
i = {
["<C-e>"] = { "copilot#Accept('<CR>')", silent = true, expr = true },
-- ["<Tab>"] = { "copilot#Accept('<CR>')", silent = true, expr = true },
}
},

25
plugins/cmp.lua Normal file

@ -0,0 +1,25 @@
local cmp = require "cmp"
local luasnip = require "luasnip"
return {
preselect = cmp.PreselectMode.None,
mapping = {
["<CR>"] = cmp.mapping.confirm { select = false },
["<Tab>"] = cmp.mapping(function(fallback)
vim.api.nvim_feedkeys(vim.fn['copilot#Accept'](vim.api.nvim_replace_termcodes('<Tab>', true, true, true)), 'n',
true)
end)
-- if luasnip.expandable() then
-- luasnip.expand()
-- elseif luasnip.expand_or_jumpable() then
-- luasnip.expand_or_jump()
-- fallback()
-- end
-- end, {
-- "i",
-- "s",
-- }),
},
experimental = {
ghost_text = false -- this feature conflict with copilot.vim's preview.
}
}