mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
refactor
This commit is contained in:
parent
d8f4707734
commit
369ab0cb22
1 changed files with 2 additions and 28 deletions
|
|
@ -226,39 +226,13 @@ return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
opts = function()
|
opts = function()
|
||||||
local ibl = require("ibl")
|
|
||||||
local conf = require("ibl.config")
|
|
||||||
|
|
||||||
LazyVim.toggle.map("<leader>ug", {
|
LazyVim.toggle.map("<leader>ug", {
|
||||||
name = "Indention Guides",
|
name = "Indention Guides",
|
||||||
get = function()
|
get = function()
|
||||||
if conf.get_config(0).enabled then
|
return require("ibl.config").get_config(0).enabled
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end,
|
end,
|
||||||
set = function(state)
|
set = function(state)
|
||||||
if state then
|
require("ibl").setup_buffer(0, { enabled = state })
|
||||||
ibl.setup_buffer(0, { enabled = true })
|
|
||||||
else
|
|
||||||
ibl.setup_buffer(0, { enabled = false })
|
|
||||||
end
|
|
||||||
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,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue