diff --git a/home/.config/nvim/autopairs.vim b/home/.config/nvim/autopairs.vim new file mode 100644 index 0000000..c62191c --- /dev/null +++ b/home/.config/nvim/autopairs.vim @@ -0,0 +1,6 @@ +lua << EOF +require("nvim-autopairs").setup {} +local Rule = require('nvim-autopairs.rule') +local npairs = require('nvim-autopairs') +npairs.add_rule(Rule("<>","<>","rs")) +EOF diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 2c06fe4..054ad8d 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -19,7 +19,9 @@ if vim.g.started_by_firenvim == true then vim.cmd('runtime common.vim') else vim.cmd('runtime common.vim') + vim.cmd('runtime plugs.vim') vim.cmd('runtime main.vim') + vim.cmd('runtime autopairs.vim') end if os.name() == "Windows" then diff --git a/home/.config/nvim/plugs.vim b/home/.config/nvim/plugs.vim index f44743e..60c387a 100644 --- a/home/.config/nvim/plugs.vim +++ b/home/.config/nvim/plugs.vim @@ -1,7 +1,7 @@ call plug#begin() Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } -Plug 'jiangmiao/auto-pairs' +Plug 'windwp/nvim-autopairs' Plug 'mhinz/vim-startify' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'psliwka/vim-smoothie' " scorll with STRG + d or STRG + u @@ -26,3 +26,7 @@ Plug 'lambdalisue/suda.vim' "Plug 'dense-analysis/ale' call plug#end() + +lua << EOF +require("nvim-autopairs").setup {} +EOF