windwp / nvim-ts-autotag

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

Setup without nvim-treesitter modules framework #109

Closed seblj closed 1 year ago

seblj commented 1 year ago

nvim-treesitter is currently undergoing a complete rewrite on a main branch where they are removing the modules framework. This means that this plugin will break at some point. As I understand it, there is still some time before the main branch will be the default over the master branch. However, I see no reason in just removing the module setup now since it can quite easily be setup without it.

This will mean a breaking change in this plugin, but it will be needed at one point anyway. I thought I would open an issue here to see if you would be open for this breaking change now. If so, I can open a PR with the changes needed

Let me know what you think!

Context: https://github.com/nvim-treesitter/nvim-treesitter/issues/4767

stale[bot] commented 1 year 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.

gegoune commented 1 year ago

Still relevant and plugin will break whether this bot likes it or not. :)

seblj commented 1 year ago

Agreed :) I am still open to doing the changes necessary

If i remember correctly looking throug the code, I think it is possible to remove the dependency of nvim-treesitter. However, that is a breaking change and I am not sure if @windwp wants that now.

IMO it should just be now if possible as it will break in the future anyway

PriceHiller commented 3 months ago

Hello! I've started maintaining a fork until windwp comes back.

Funnily enough I've implemented these changes on my fork. If you want to give it a shot, take a look @ https://github.com/PriceHiller/nvim-ts-autotag

seblj commented 3 months ago

Thanks! I actually did it myself as well😄https://github.com/seblj/nvim-ts-autotag

However, I trimmed it down quite a bit and removed features that I don't use/want

PriceHiller commented 3 months ago

Oh you've been doing a fair bit of maintenance on your own 👀

If you know of any particular pitfalls I haven't caught I'd love to have your stuff sent over to me.

seblj commented 3 months ago

I can't think of any particular pitfalls since I think I did it in a couple of days, and haven't really touched it since😅 the tests were very helpful at least!

I still feel like it can be simplified even more, but it works pretty much as I expect. There is a lot of edge cases related to renaming tags though... especially related to the html parser. But I don't know if it really is possible to handle all cases