nvim-ts-autotag icon indicating copy to clipboard operation
nvim-ts-autotag copied to clipboard

Autotag inserts tag name incorrectly after trailing slash

Open vjrasane opened this issue 1 year ago • 5 comments

autotag bug

I noticed some weird behavior when trying to insert self closing tags in JSX. After placing the trailing slash autotag inserts the tag name after it for some reason. I've verified that the problem only occurs with autotag enabled, but it could of course be caused by some interaction with other autocomplete plugins for example. I do not have a minimal repro at this time, but I can provide the full nvim config if needed.

Treesitter version: master commit 3da5cfb Autotag version: main commit 6be1192 Nvim version info:

{
  api_compatible = 0,
  api_level = 11,
  api_prerelease = false,
  major = 0,
  minor = 9,
  patch = 1,
  prerelease = false
}

vjrasane avatar Nov 21 '23 08:11 vjrasane

Sometimes it inserts the next tag name instead of the current tag:

nvim-reddit-bug2

matthewrosse avatar Nov 27 '23 15:11 matthewrosse

having same issue

maxmaio avatar Nov 30 '23 23:11 maxmaio

Same issue here. For now I've worked around this by setting enable_close_on_slash = false in the treesitter autotag config.

Kachajal avatar Dec 01 '23 12:12 Kachajal

~~@Kachajal This fixed it for me thanks!~~ still getting the same issue as @matthewrosse

maxmaio avatar Dec 01 '23 16:12 maxmaio

Looks like it's been fixed in the latest version.

amirhhashemi avatar Dec 27 '23 14:12 amirhhashemi

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.

stale[bot] avatar Feb 25 '24 18:02 stale[bot]