mirror of
https://github.com/pnx/dotfiles
synced 2026-07-03 23:13:39 +02:00
add nvim/lua/user/utils/indent_guidelines.lua
This commit is contained in:
parent
514ce5fefc
commit
9b11ccd05c
1 changed files with 17 additions and 0 deletions
17
nvim/lua/user/utils/indent_guidelines.lua
Normal file
17
nvim/lua/user/utils/indent_guidelines.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.toggle()
|
||||||
|
user.indentGuides = not user.indentGuides
|
||||||
|
M.show(user.indentGuides)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param value boolean
|
||||||
|
function M.show(value)
|
||||||
|
local has_ibl, ibl = pcall(require, "ibl")
|
||||||
|
if has_ibl then
|
||||||
|
ibl.update { enabled = value }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Loading…
Add table
Add a link
Reference in a new issue