summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/autopairs
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-03-16 21:54:42 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-03-16 21:54:42 +0100
commit2b6ae8473e1b0fb8cc0bd16aa8c485a77ee5e847 (patch)
tree3e9e499480f1694f25a0835877e3ba5e63e403d4 /.config/nvim/lua/autopairs
parentc0284168111a9b74761cf2094bdc16fec9006f7b (diff)
renaming, treesitter buggy
Diffstat (limited to '.config/nvim/lua/autopairs')
-rw-r--r--.config/nvim/lua/autopairs/init.lua40
1 files changed, 0 insertions, 40 deletions
diff --git a/.config/nvim/lua/autopairs/init.lua b/.config/nvim/lua/autopairs/init.lua
deleted file mode 100644
index 6810a77..0000000
--- a/.config/nvim/lua/autopairs/init.lua
+++ /dev/null
@@ -1,40 +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("<c-y>")
- else
- vim.defer_fn(function()
- vim.fn["compe#confirm"]("<cr>")
- end, 20)
- return npairs.esc("<c-n>")
- end
- else
- return npairs.check_break_line_char()
- end
-end
-
-
-remap('i' , '<CR>','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true})