Go to file
2021-03-10 12:05:05 +07:00
.github Init 2021-03-08 10:49:04 +07:00
lua fix: jsx #3 2021-03-10 12:05:05 +07:00
sample fix: jsx #3 2021-03-10 12:05:05 +07:00
tests fix: jsx #3 2021-03-10 12:05:05 +07:00
.gitignore add autorename 2021-03-08 21:14:32 +07:00
LICENSE Initial commit 2021-03-08 07:59:24 +07:00
Makefile add autorename 2021-03-08 21:14:32 +07:00
README.md update reademe.md 2021-03-09 11:57:14 +07:00

nvim-ts-autotag

Use treesitter to autoclose and autorename xml tag

It work with tsx,vue,svelte.

Usage

Before        Input         After
------------------------------------
<div           >         <div></div>
------------------------------------

Setup

Neovim 0.5 with and nvim-treesitter to work

require('nvim-ts-autotag').setup()

Default values

local filetypes = {
  'html', 'xml', 'javascript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue'
}
local skip_tags = {
  'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'slot',
  'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr','menuitem'
}

Override default values

require('nvim-ts-autotag').setup({
  filetypes = { "html" , "xml" },
})

Ref

vim-closetag