feat(ui)!: moved treesitter-context to an extra. No longer a core plugin
This commit is contained in:
21
lua/lazyvim/plugins/extras/ui/treesitter-context.lua
Normal file
21
lua/lazyvim/plugins/extras/ui/treesitter-context.lua
Normal 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",
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user