Mercurial > dotfiles
changeset 447:aa15d8b06f04
Configure autopairs for cmp
author | Zeger Van de Vannet <zegervdv@me.com> |
---|---|
date | Thu, 02 Sep 2021 12:07:11 +0200 |
parents | 9c575d146453 |
children | d847c4df584b |
files | dot_config/nvim/init.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <CR> 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