windwp / nvim-ts-autotag

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

Lazy-loading doesn't work #193

Closed savchenko closed 1 month ago

savchenko commented 1 month ago

Lazy-loading via "Lazy" plugin manager doesn't seem to work. Can be reproduced by adding the following 2 lines to the plugin spec:

lazy = true,
ft = { 'html' }

...and opening an HTML file.

PriceHiller commented 1 month ago

Might be because we depend on the Filetype event to attach nvim-ts-autotag.

Please read the note on lazy loading here.

nvim-ts-autotag is pretty efficient on deciding when to attach, lazy loading it shouldn't really impact startup time at all. If you insist on lazy loading, read the linked section and avoid anything that might interfere with picking up on Filetype events.