mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 04:21:03 +00:00
24 lines
660 B
Lua
24 lines
660 B
Lua
return {
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
event = "BufReadPost",
|
|
opts = {
|
|
mode = "topline", -- default is 'cursor'
|
|
max_lines = 3,
|
|
},
|
|
keys = {
|
|
{
|
|
"<leader>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",
|
|
},
|
|
},
|
|
}
|