mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-16 12:24:36 +02:00
20 lines
475 B
Lua
20 lines
475 B
Lua
-- Show context of the current function
|
|
return {
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
event = "VeryLazy",
|
|
opts = function()
|
|
local tsc = require("treesitter-context")
|
|
Snacks.toggle({
|
|
name = "Treesitter Context",
|
|
get = tsc.enabled,
|
|
set = function(state)
|
|
if state then
|
|
tsc.enable()
|
|
else
|
|
tsc.disable()
|
|
end
|
|
end,
|
|
}):map("<leader>ut")
|
|
return { mode = "cursor", max_lines = 3 }
|
|
end,
|
|
}
|