]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/treesitter.lua
lazyvim: replace LazyFile with their actual events
[dotfiles.git] / nvim / lua / plugins / treesitter.lua
index f58f6aee67669193444bd54f605c481eecf1cc2f..5ffa798049ee980e5921fc5570ae9826e62e0760 100644 (file)
@@ -2,7 +2,7 @@ return {
   { "nvim-treesitter/nvim-treesitter",
     dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
     build = ":TSUpdate",
   { "nvim-treesitter/nvim-treesitter",
     dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
     build = ":TSUpdate",
-    event = { "LazyFile", "VeryLazy" },
+    event = { "BufReadPost", "BufNewFile", "BufWritePre" , "VeryLazy" },
     lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
     init = function(plugin)
       -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
     lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
     init = function(plugin)
       -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
@@ -106,7 +106,7 @@ return {
   -- Automatically add closing tags for HTML and JSX
   {
     "windwp/nvim-ts-autotag",
   -- Automatically add closing tags for HTML and JSX
   {
     "windwp/nvim-ts-autotag",
-    event = "LazyFile",
+    event = { "BufReadPost", "BufNewFile", "BufWritePre" },
     opts = {},
   },
 }
     opts = {},
   },
 }