windwp / nvim-ts-autotag

Use treesitter to auto close and auto rename html tag
MIT License
1.62k stars 86 forks source link

feat: allow tag renaming for normal mode operations like x and d motions #126

Closed ribru17 closed 10 months ago

ribru17 commented 1 year ago

Fixes #81

ribru17 commented 1 year ago

NOTE: I didn't know how to implement tests for this as it seems they are hard coded to only account for insert mode renaming. To get around this I added an insert operation at the end of each test but this is not ideal obviously. Would appreciate help in that category. Other than that tests mostly showcase what this commit makes possible, as well as the limitations.

stale[bot] commented 11 months ago

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.

PriceHiller commented 3 months ago

It appears the primary maintainer is currently preoccupied and hasn't been responding (https://github.com/windwp/nvim-ts-autotag/issues/163#issuecomment-2107013155). Not a dig against them, they've provided a great plugin at no charge.

In the meantime, I'll be maintaing a fork until they're back @ https://github.com/PriceHiller/nvim-ts-autotag/.

@ribru17 with my copypasta now pasted, was there anything wrong with this PR that would keep it from being merged? If there wasn't I may be merging this into my fork.

ribru17 commented 3 months ago

Thanks for doing that! Nothing wrong with this PR except for the fact that the tests aren't really legitimate and don't test anything. I wasn't able to get the autocmd to run in the testing environment sadly, but if one were to check this out and run it on their machine everything would work fine (at least, as of when I committed it). So I think it is good to merge without tests. I can remove them if need be

PriceHiller commented 3 months ago

Great to hear that it works, I'd include the tests you added and I can debug later as to why they're non-functional.

Currently I'm trying to wrangle existing tests into working order, so if you want to PR to me on my fork with your changes I'll definitely take a look and most likely merge.

If you don't have the time, I'll get around to merging this myself after I get the current tests passing whenever that is.