mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(indent-blankline): add which-key toggles
This commit is contained in:
parent
0d561a3226
commit
2c8ec0b5cb
1 changed files with 59 additions and 21 deletions
|
|
@ -225,28 +225,66 @@ return {
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
opts = {
|
opts = function()
|
||||||
indent = {
|
local ibl = require("ibl")
|
||||||
char = "│",
|
local conf = require("ibl.config")
|
||||||
tab_char = "│",
|
|
||||||
},
|
LazyVim.toggle.map("<leader>ug", {
|
||||||
scope = { show_start = false, show_end = false },
|
name = "Indention Guides",
|
||||||
exclude = {
|
get = function()
|
||||||
filetypes = {
|
if conf.get_config(0).enabled then
|
||||||
"help",
|
return true
|
||||||
"alpha",
|
end
|
||||||
"dashboard",
|
return false
|
||||||
"neo-tree",
|
end,
|
||||||
"Trouble",
|
set = function(state)
|
||||||
"trouble",
|
if state then
|
||||||
"lazy",
|
ibl.setup_buffer(0, { enabled = true })
|
||||||
"mason",
|
else
|
||||||
"notify",
|
ibl.setup_buffer(0, { enabled = false })
|
||||||
"toggleterm",
|
end
|
||||||
"lazyterm",
|
end,
|
||||||
|
})
|
||||||
|
LazyVim.toggle.map("<leader>uS", {
|
||||||
|
name = "Scope Highlight",
|
||||||
|
get = function()
|
||||||
|
if conf.get_config(0).scope.enabled then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
set = function(state)
|
||||||
|
if state then
|
||||||
|
ibl.setup_buffer(0, { scope = { enabled = true } })
|
||||||
|
else
|
||||||
|
ibl.setup_buffer(0, { scope = { enabled = false } })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
indent = {
|
||||||
|
char = "│",
|
||||||
|
tab_char = "│",
|
||||||
},
|
},
|
||||||
},
|
scope = { show_start = false, show_end = false },
|
||||||
},
|
exclude = {
|
||||||
|
filetypes = {
|
||||||
|
"help",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
"trouble",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"notify",
|
||||||
|
"toggleterm",
|
||||||
|
"lazyterm",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue