From e9dc8603c845ffc1c52e8f608e6591403b31eadd Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 26 Mar 2021 13:48:58 -0400 Subject: fix snippet bug --- lua/nv-nvim-autopairs/init.lua | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 lua/nv-nvim-autopairs/init.lua (limited to 'lua/nv-nvim-autopairs/init.lua') diff --git a/lua/nv-nvim-autopairs/init.lua b/lua/nv-nvim-autopairs/init.lua deleted file mode 100644 index a4212b1e..00000000 --- a/lua/nv-nvim-autopairs/init.lua +++ /dev/null @@ -1,41 +0,0 @@ -require('nvim-autopairs').setup() - -local pairs_map = { - ["'"] = "'", - ['"'] = '"', - ['('] = ')', - ['['] = ']', - ['{'] = '}', - ['`'] = '`', - ['```'] = '```', -} -local disable_filetype = { "TelescopePrompt" } -local break_line_filetype = nil -- mean all file type -local html_break_line_filetype = {'html' , 'vue' , 'typescriptreact' , 'svelte' , 'javascriptreact'} -local ignored_next_char = "%w" - -local remap = vim.api.nvim_set_keymap -local npairs = require('nvim-autopairs') - --- skip it, if you use another global object -_G.MUtils= {} - -vim.g.completion_confirm_key = "" -MUtils.completion_confirm=function() - if vim.fn.pumvisible() ~= 0 then - if vim.fn.complete_info()["selected"] ~= -1 then - vim.fn["compe#confirm"]() - return npairs.esc("") - else - vim.defer_fn(function() - vim.fn["compe#confirm"]("") - end, 20) - return npairs.esc("") - end - else - return npairs.check_break_line_char() - end -end - - -remap('i' , '','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true}) -- cgit v1.2.3