mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2025-01-01 13:59:13 -06:00
.github | ||
lua | ||
sample | ||
tests | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
README.md |
nvim-ts-autotag
Use treesitter to autoclose and autorename xml tag
It work with tsx,vue,svelte. it use treesitter then it only close and rename the tag match with your current cursor.
Usage
Before Input After
------------------------------------
<div > <div></div>
------------------------------------
Setup
Neovim 0.5 with and nvim-treesitter to work
require('nvim-ts-closetag').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-closetag').setup({
filetypes = { "html" , "xml" },
})