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

@ -452,7 +452,6 @@ return {
-- buffer remove
{
"echasnovski/mini.bufremove",
keys = {
{
"<leader>bd",

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",
},
},
}

View file

@ -118,29 +118,6 @@ return {
end,
},
-- Show context of the current function
{
"nvim-treesitter/nvim-treesitter-context",
event = "LazyFile",
enabled = true,
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",
},
},
},
-- Automatically add closing tags for HTML and JSX
{
"windwp/nvim-ts-autotag",