sign with gpg and update autopairs things.
This commit is contained in:
parent
ce1e687737
commit
7a4cdd6922
@ -3,21 +3,13 @@ local npairs = require('nvim-autopairs')
|
||||
|
||||
npairs.setup({ map_bs = false })
|
||||
|
||||
vim.g.coq_settings = {
|
||||
auto_start = true,
|
||||
clients = {tabnine = {enabled = true}},
|
||||
keymap = {recommended = false}
|
||||
}
|
||||
vim.g.coq_settings = { keymap = { recommended = false } }
|
||||
|
||||
-- these mappings are coq recommended mappings unrelated to nvim-autopairs
|
||||
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]],
|
||||
{expr = true, noremap = true})
|
||||
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]],
|
||||
{expr = true, noremap = true})
|
||||
remap('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]],
|
||||
{expr = true, noremap = true})
|
||||
remap('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<bs>"]],
|
||||
{expr = true, noremap = true})
|
||||
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]], { expr = true, noremap = true })
|
||||
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], { expr = true, noremap = true })
|
||||
remap('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]], { expr = true, noremap = true })
|
||||
remap('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<bs>"]], { expr = true, noremap = true })
|
||||
|
||||
-- skip it, if you use another global object
|
||||
_G.MUtils= {}
|
||||
@ -27,8 +19,7 @@ MUtils.CR = function()
|
||||
if vim.fn.complete_info({ 'selected' }).selected ~= -1 then
|
||||
return npairs.esc('<c-y>')
|
||||
else
|
||||
-- you can change <c-g><c-g> to <c-e> if you don't use other i_CTRL-X modes
|
||||
return npairs.esc('<c-g><c-g>') .. npairs.autopairs_cr()
|
||||
return npairs.esc('<c-e>') .. npairs.autopairs_cr()
|
||||
end
|
||||
else
|
||||
return npairs.autopairs_cr()
|
||||
@ -37,8 +28,7 @@ end
|
||||
remap('i', '<cr>', 'v:lua.MUtils.CR()', { expr = true, noremap = true })
|
||||
|
||||
MUtils.BS = function()
|
||||
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({'mode'}).mode ==
|
||||
'eval' then
|
||||
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ 'mode' }).mode == 'eval' then
|
||||
return npairs.esc('<c-e>') .. npairs.autopairs_bs()
|
||||
else
|
||||
return npairs.autopairs_bs()
|
||||
|
Loading…
Reference in New Issue
Block a user