feat(ui)!: moved treesitter-context to an extra. No longer a core plugin

This commit is contained in:
Folke Lemaitre
2024-05-16 18:20:09 +02:00
parent 9839f10013
commit 03704e2299
3 changed files with 21 additions and 24 deletions

View File

@ -0,0 +1,21 @@
-- Show context of the current function
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",
},
},
}