feat(snacks)!: use snacks.indent and moved indent-blankline to extras

This commit is contained in:
Folke Lemaitre 2024-12-12 07:06:26 +01:00
parent 9b07544e89
commit 94fdc421a1
3 changed files with 52 additions and 44 deletions

View file

@ -0,0 +1,51 @@
return {
-- disable snacks indent when animate is enabled
{
"snacks.nvim",
opts = {
indent = { enabled = false },
},
},
{
"lukas-reineke/indent-blankline.nvim",
event = "LazyFile",
opts = function()
Snacks.toggle({
name = "Indention Guides",
get = function()
return require("ibl.config").get_config(0).enabled
end,
set = function(state)
require("ibl").setup_buffer(0, { enabled = state })
end,
}):map("<leader>ug")
return {
indent = {
char = "",
tab_char = "",
},
scope = { show_start = false, show_end = false },
exclude = {
filetypes = {
"Trouble",
"alpha",
"dashboard",
"help",
"lazy",
"mason",
"neo-tree",
"notify",
"snacks_dashboard",
"snacks_notif",
"snacks_terminal",
"snacks_win",
"toggleterm",
"trouble",
},
},
}
end,
main = "ibl",
},
}

View file

@ -34,6 +34,7 @@ return {
notifier = { enabled = true }, notifier = { enabled = true },
quickfile = { enabled = true }, quickfile = { enabled = true },
statuscolumn = { enabled = false }, -- we set this in options.lua statuscolumn = { enabled = false }, -- we set this in options.lua
indent = { enabled = true },
terminal = { terminal = {
win = { win = {
keys = { keys = {

View file

@ -185,50 +185,6 @@ return {
end, end,
}, },
-- indent guides for Neovim
{
"lukas-reineke/indent-blankline.nvim",
event = "LazyFile",
opts = function()
Snacks.toggle({
name = "Indention Guides",
get = function()
return require("ibl.config").get_config(0).enabled
end,
set = function(state)
require("ibl").setup_buffer(0, { enabled = state })
end,
}):map("<leader>ug")
return {
indent = {
char = "",
tab_char = "",
},
scope = { show_start = false, show_end = false },
exclude = {
filetypes = {
"Trouble",
"alpha",
"dashboard",
"help",
"lazy",
"mason",
"neo-tree",
"notify",
"snacks_dashboard",
"snacks_notif",
"snacks_terminal",
"snacks_win",
"toggleterm",
"trouble",
},
},
}
end,
main = "ibl",
},
-- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu. -- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
{ {
"folke/noice.nvim", "folke/noice.nvim",