diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-05 08:46:35 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-05 08:46:35 +0200 |
commit | 77cdf208765ad351e48724ed5ad57e55703eca61 (patch) | |
tree | 7f19757b255ab66895d9240a5aca77a35cef8aac /.config/nvim/lua/core/autopairs.lua | |
parent | 4fd170aa9d55b7bcd1f0a9445c9e136b560e3220 (diff) |
Add major update to LSP from lunarvim
Diffstat (limited to '.config/nvim/lua/core/autopairs.lua')
-rw-r--r-- | .config/nvim/lua/core/autopairs.lua | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/.config/nvim/lua/core/autopairs.lua b/.config/nvim/lua/core/autopairs.lua index 8ea3094..0c9ec28 100644 --- a/.config/nvim/lua/core/autopairs.lua +++ b/.config/nvim/lua/core/autopairs.lua @@ -7,8 +7,16 @@ function M.config() ---@usage map <CR> on insert mode map_cr = true, ---@usage auto insert after select function or method item - -- NOTE: This should be wrapped into a function so that it is re-evaluated when opening new files - map_complete = vim.bo.filetype ~= "tex", + map_complete = true, + ---@usage automatically select the first item + auto_select = true, + ---@usage use insert confirm behavior instead of replace + insert = false, + ---@usage -- modifies the function or method delimiter by filetypes + map_char = { + all = "(", + tex = "{", + }, ---@usage check treesitter check_ts = true, ts_config = { @@ -52,9 +60,11 @@ M.setup = function() if package.loaded["cmp"] then require("nvim-autopairs.completion.cmp").setup { - map_cr = true, -- map <CR> on insert mode - map_complete = true, -- it will auto insert `(` after select function or method item - auto_select = true, -- automatically select the first item + map_cr = options.builtin.autopairs.map_cr, + map_complete = options.builtin.autopairs.map_complete, + auto_select = options.builtin.autopairs.auto_select, + insert = options.builtin.autopairs.insert, + map_char = options.builtin.autopairs.map_char, } end |