diff --git a/init.plugins.vim b/init.plugins.vim index cd854f4..b5f1a69 100644 --- a/init.plugins.vim +++ b/init.plugins.vim @@ -71,12 +71,19 @@ Plug '~/nvim-paper-tonic' nnoremap cc :ColorToggle "}}} -" #delimitMate{{{ -" https://github.com/Raimondi/delimitMate +" #nvim-autopairs {{{ +" https://github.com/windwp/nvim-autopairs " automatic quote, paranthesis,etc closing. - Plug 'Raimondi/delimitMate' - let delimitMate_expand_cr = 1 - let delimitMate_expand_space = 1 + Plug 'windwp/nvim-autopairs' + "}}} + + +" #nvim-autopairs {{{ +" https://github.com/windwp/nvim-ts-autotag +" automatic html tag closing/renaming. +Plug 'windwp/nvim-ts-autotag', { 'branch': 'main' } + + "}}} " #emmet-vim {{{ " https://github.com/mattn/emmet-vim diff --git a/lua/init-plugins.lua b/lua/init-plugins.lua index 6fd76b3..2d81706 100644 --- a/lua/init-plugins.lua +++ b/lua/init-plugins.lua @@ -192,3 +192,18 @@ cmp.setup({ ... } }) +-- nvim-autopairs +require('nvim-autopairs').setup{} +-- you need setup cmp first put this after cmp.setup() +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 = true -- automatically select the first item +}) + +--nvim-ts-autotag +require'nvim-treesitter.configs'.setup { + autotag = { + enable = true, + } +}