From 83017ff28afa8b8ddf9254564d8b4a9c96ec3f7d Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Thu, 5 Dec 2024 00:11:40 -0800 Subject: [PATCH] fix(extras.treesitter-context): change event back to `LazyFile` (#4940) ## Description Load treesitter-context on `LazyFile` instead of `VeryLazy`. IMHO it didn't make sense to load the plugin earlier just so that the toggle is available, especially when the toggle won't actually have any effect anything until a file is opened. ~Previously, treesitter-context was loaded on `VeryLazy` and its toggle map in `opt`, which also `require`d it. Now, mapping happens in config, after treesitter-context is setup (also how toggle is handled in other extras, eg for render-markdown).~ ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ui/treesitter-context.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-context.lua b/lua/lazyvim/plugins/extras/ui/treesitter-context.lua index ba9565a1..866e72f2 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-context.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-context.lua @@ -1,7 +1,7 @@ -- Show context of the current function return { "nvim-treesitter/nvim-treesitter-context", - event = "VeryLazy", + event = "LazyFile", opts = function() local tsc = require("treesitter-context") Snacks.toggle({