# HG changeset patch # User Zeger Van de Vannet # Date 1630577231 -7200 # Node ID aa15d8b06f04872187a4747f17c4fe5df91dacaf # Parent 9c575d1464535eae1b179173eda0422bcbfa1d27 Configure autopairs for cmp diff -r 9c575d146453 -r aa15d8b06f04 dot_config/nvim/init.lua --- a/dot_config/nvim/init.lua Wed Sep 01 11:14:31 2021 +0200 +++ b/dot_config/nvim/init.lua Thu Sep 02 12:07:11 2021 +0200 @@ -95,6 +95,12 @@ local npairs = require 'nvim-autopairs' local Rule = require 'nvim-autopairs.rule' + require("nvim-autopairs.completion.cmp").setup { + map_cr = true, -- map on insert mode + map_complete = true, -- it will auto insert `(` after select function or method item + auto_select = false, -- automatically select the first item + } + npairs.setup { ignored_next_char = string.gsub([[ [%w%%%'%[%.] ]], '%s+', ''), } @@ -138,6 +144,7 @@ return vim.bo.filetype ~= 'systemverilog' end) end, + after = { 'nvim-cmp' } } -- Moving around within lines