From 57daea020814ad99fc64de1c0108cb6b0e552dfa Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 21 May 2024 14:13:27 -0500 Subject: [PATCH] docs: add section about lazy loading to README Closes #178 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ce78521..da02fb5 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,12 @@ require('nvim-ts-autotag').setup({ > If you are setting up via `nvim-treesitter.configs` it has been deprecated! Please migrate to the > new way. It will be removed in `1.0.0`. +### A note on lazy loading + +For those of you using lazy loading through a plugin manager (like [lazy.nvim](https://github.com/folke/lazy.nvim)) lazy +loading is not particularly necessary for this plugin. `nvim-ts-autotag` is efficient in choosing when it needs to load. +If you still insist on lazy loading `nvim-ts-autotag`, then two good events to use are `BufReadPre` & `BufNewFile`. + ### Extending the default config Let's say that there's a language that `nvim-ts-autotag` doesn't currently support and you'd like to support it in your