starter/old/lua/plugins/treesitter-context.lua
2025-08-12 12:38:34 -03:00

20 lines
555 B
Lua

return {
"nvim-treesitter/nvim-treesitter-context",
event = "LazyFile",
opts = { mode = "cursor", max_lines = 3 },
keys = {
{
"<leader>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",
},
},
}