diff --git a/init.lua b/init.lua index 60fcd1dd..ed810003 100644 --- a/init.lua +++ b/init.lua @@ -858,6 +858,10 @@ require('lazy').setup({ additional_vim_regex_highlighting = { 'ruby' }, }, indent = { enable = true, disable = { 'ruby' } }, + autotag = { + enable = true, + filetypes = { 'html', 'xml', 'javascriptreact', 'typescriptreact' }, + }, }, config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` diff --git a/lua/custom/plugins/autotag.lua b/lua/custom/plugins/autotag.lua new file mode 100644 index 00000000..5b65064c --- /dev/null +++ b/lua/custom/plugins/autotag.lua @@ -0,0 +1,15 @@ +return { + 'windwp/nvim-ts-autotag', + dependencies = 'nvim-treesitter/nvim-treesitter', + config = function() + require('nvim-ts-autotag').setup { + opts = { + enable_close = true, + enable_rename = true, + enable_close_on_slash = true, + }, + } + end, + lazy = true, + event = 'VeryLazy', +}