diff --git a/lua/plugins/treesitter-context.lua b/lua/plugins/treesitter-context.lua new file mode 100644 index 0000000..5cbf2de --- /dev/null +++ b/lua/plugins/treesitter-context.lua @@ -0,0 +1,21 @@ +return { + "nvim-treesitter/nvim-treesitter-context", + -- event = "LazyFile", + opts = { mode = "cursor", max_lines = 3 }, + keys = { + { + "ut", + function() + local tsc = require("treesitter-context") + tsc.toggle() + -- TODO: Convert this message to plain nvim + -- if LazyVim.inject.get_upvalue(tsc.toggle, "enabled") then + -- LazyVim.info("Enabled Treesitter Context", { title = "Option" }) + -- else + -- LazyVim.warn("Disabled Treesitter Context", { title = "Option" }) + -- end + end, + desc = "Toggle Treesitter Context", + }, + }, +} diff --git a/old/lua/plugins/treesitter-context.lua b/old/lua/plugins/treesitter-context.lua deleted file mode 100644 index df1f36c..0000000 --- a/old/lua/plugins/treesitter-context.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter-context", - event = "LazyFile", - opts = { mode = "cursor", max_lines = 3 }, - keys = { - { - "ut", - function() - local tsc = require("treesitter-context") - tsc.toggle() - if LazyVim.inject.get_upvalue(tsc.toggle, "enabled") then - LazyVim.info("Enabled Treesitter Context", { title = "Option" }) - else - LazyVim.warn("Disabled Treesitter Context", { title = "Option" }) - end - end, - desc = "Toggle Treesitter Context", - }, - }, -}