]> 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 96e8c1a415a60bf5b328e7c9f55063ea29efbab8..5ffa798049ee980e5921fc5570ae9826e62e0760 100644 (file)
@@ -2,7 +2,7 @@ return {
   { "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
@@ -28,6 +28,11 @@ return {
         "bash",
         "c",
         "diff",
+        "git_config",
+        "git_rebase",
+        "gitattributes",
+        "gitcommit",
+        "gitignore",
         "html",
         "javascript",
         "jsdoc",
@@ -101,7 +106,7 @@ return {
   -- Automatically add closing tags for HTML and JSX
   {
     "windwp/nvim-ts-autotag",
-    event = "LazyFile",
+    event = { "BufReadPost", "BufNewFile", "BufWritePre" },
     opts = {},
   },
 }