add nvim-autopairs, nvim-ts-autotag

This commit is contained in:
Ray Elliott 2021-09-09 14:56:57 +01:00
parent 7b13d73648
commit aaf41ab39e
2 changed files with 27 additions and 5 deletions

View File

@ -71,12 +71,19 @@ Plug '~/nvim-paper-tonic'
nnoremap <silent> <cr>cc :ColorToggle<CR> nnoremap <silent> <cr>cc :ColorToggle<CR>
"}}} "}}}
" #delimitMate{{{ " #nvim-autopairs {{{
" https://github.com/Raimondi/delimitMate " https://github.com/windwp/nvim-autopairs
" automatic quote, paranthesis,etc closing. " automatic quote, paranthesis,etc closing.
Plug 'Raimondi/delimitMate' Plug 'windwp/nvim-autopairs'
let delimitMate_expand_cr = 1 "}}}
let delimitMate_expand_space = 1
" #nvim-autopairs {{{
" https://github.com/windwp/nvim-ts-autotag
" automatic html tag closing/renaming.
Plug 'windwp/nvim-ts-autotag', { 'branch': 'main' }
"}}} "}}}
" #emmet-vim {{{ " #emmet-vim {{{
" https://github.com/mattn/emmet-vim " https://github.com/mattn/emmet-vim

View File

@ -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 <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
})
--nvim-ts-autotag
require'nvim-treesitter.configs'.setup {
autotag = {
enable = true,
}
}