summaryrefslogtreecommitdiff
path: root/lua/lvim/core/indentlines.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-10-17 17:29:15 +0200
committerkylo252 <[email protected]>2022-10-17 17:29:15 +0200
commit4ef07315003f723bb8e97d5a91b2bde3773ec1b8 (patch)
treee9889a492f76e3f9573228343aaba647dfd48136 /lua/lvim/core/indentlines.lua
parente4a5fe97abe500bbbe78fb137d57a59f558da05a (diff)
parent6f6cbc394d2a7e64964b6067a2f42d2e6a07824e (diff)
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'lua/lvim/core/indentlines.lua')
-rw-r--r--lua/lvim/core/indentlines.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/lua/lvim/core/indentlines.lua b/lua/lvim/core/indentlines.lua
new file mode 100644
index 00000000..dc4a72ba
--- /dev/null
+++ b/lua/lvim/core/indentlines.lua
@@ -0,0 +1,42 @@
+local M = {}
+
+M.config = function()
+ lvim.builtin.indentlines = {
+ active = true,
+ on_config_done = nil,
+ options = {
+ enabled = true,
+ buftype_exclude = { "terminal", "nofile" },
+ filetype_exclude = {
+ "help",
+ "startify",
+ "dashboard",
+ "packer",
+ "neogitstatus",
+ "NvimTree",
+ "Trouble",
+ "text",
+ },
+ char = lvim.icons.ui.LineLeft,
+ show_trailing_blankline_indent = false,
+ show_first_indent_level = true,
+ use_treesitter = true,
+ show_current_context = true,
+ },
+ }
+end
+
+M.setup = function()
+ local status_ok, indent_blankline = pcall(reload, "indent_blankline")
+ if not status_ok then
+ return
+ end
+
+ indent_blankline.setup(lvim.builtin.indentlines.options)
+
+ if lvim.builtin.indentlines.on_config_done then
+ lvim.builtin.indentlines.on_config_done()
+ end
+end
+
+return M