windwp / nvim-ts-autotag

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

feat: allow to be lazy loaded on InsertEnter #212

Closed lopi-py closed 2 weeks ago

PriceHiller commented 2 weeks ago

Hello, thanks for the PR!

I'm assuming there's a performance problem that prompted this PR? To my knowledge nvim-ts-autotag is pretty quick on load, there really shouldn't be much of a startup impact at all (around ~5 ms).

If you can demonstrate a significant startup performance hit, I'm open to merging this (assuming lazy loading on InsertEnter works, of course).

lopi-py commented 2 weeks ago

I lazy/defer load nvim-treesitter because the typescript parser is slow (not shown in the startup time but the delay is very noticeable) when I open a buffer, but nvim-ts-autotag forces nvim-treesitter to load image I definitely tested this before opening a PR.

PriceHiller commented 2 weeks ago

Ah, that makes sense. Thanks again for the PR!