Closed chaozwn closed 8 months ago
I have this problem as well. It appears doing a self-closing tag e.g. <br />
will result in an attempt to close the closest parent tag. In your case, that is div
.
This is an example of what happens when I try to close <Input />
:
E: seems #124 reports the same
I have this issue as well.
For the time being, you can disable the close on slash functionality in your treesitter config.
autotag = {
enable = true,
enable_close_on_slash = false,
},
I have this issue too. Callum7's solution worked perfectly for me, but I just want to mention I tried to fix it in the same way using
require "nvim-ts-autotag".setup {
autotag = {
enable = true,
enable_rename = true,
enable_close_on_slash = false,
}
}
But it seems this config wasn't read, only the treesitter config. Don't know if this is an issue as well, but I'll leave it here.
Callum7's solution worked for me too. Shouldn't that option be set to false by default?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This bug still exists. Disabling the feature with enable_close_on_slash = false
is the current workaround
with autocomplete always return /div>.
https://github.com/windwp/nvim-ts-autotag/assets/51357674/ea34e54c-d84b-4cc7-834b-2583e5754afb