ts-autotag fixed

This commit is contained in:
Sarjyant 2024-09-18 06:30:46 +05:45
parent 87857e4028
commit 3d397d3d05
4 changed files with 29 additions and 52 deletions

View file

@ -2,6 +2,9 @@ return {
{ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
dependencies = {
'windwp/nvim-ts-autotag',
},
config = function()
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
@ -14,6 +17,23 @@ return {
indent = { enable = true },
}
require('nvim-ts-autotag').setup {
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
-- Also override individual filetype configs, these take priority.
-- Empty by default, useful if one of the "opts" global settings
-- doesn't work well in a specific filetype
per_filetype = {
['html'] = {
enable_close = false,
},
},
}
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--