windwp/nvim-ts-autotag

With lazy, works in html files, doesn't work in js/jsx files

Closed this issue · 5 comments

I've been able to install nvim-ts-autotag with lazy.vim, and it works totally fine in html files, but inside a js or jsx file with React code it does nothing.

In the nvim-treesitter config file I have this for autotagging:

				autotag = { 
					enable = true,
					enable_rename = true,
					enable_close = true,
					enable_close_on_slash = true,
					filetypes = { "html" , "xml", "js", "jsx"},	
				},

but it still only works inside html files.

What do I need to change to make this work?

I had the same issue but with typescript, try including "javascriptreact" as well in the filetypes. That seemed to work for me. Also try replacing "js" with "javascript"

That seems to have done it, though it doesn't seem to work everywhere I'd expect it to. Thank you!

The plugin doesn't work at all on any extension for me. Did a fresh installation with lazy.vim and followed all the hacks/suggestions mentioned in other threads.

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.

Hey folks if you're still having issues, I've begun maintaining a fork over @ https://github.com/PriceHiller/nvim-ts-autotag until windwp is active again.

Give it a shot and if it's still not working then open an issue over there and I'll investigate 🙂.

I am now helping maintain this plugin, that fork has been merged.