mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 09:48:59 +02:00
feat(ui)!: moved treesitter-context to an extra. No longer a core plugin
This commit is contained in:
parent
9839f10013
commit
03704e2299
3 changed files with 21 additions and 24 deletions
|
@ -452,7 +452,6 @@ return {
|
||||||
-- buffer remove
|
-- buffer remove
|
||||||
{
|
{
|
||||||
"echasnovski/mini.bufremove",
|
"echasnovski/mini.bufremove",
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>bd",
|
"<leader>bd",
|
||||||
|
|
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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -118,29 +118,6 @@ return {
|
||||||
end,
|
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
|
-- Automatically add closing tags for HTML and JSX
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue