summaryrefslogtreecommitdiff
path: root/lua/lvim/core/indentlines.lua
blob: 2c974b9692807bc21fe1760fda9aab880e0b0373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
local M = {}

M.config = function()
  lvim.builtin.indentlines.opts = {
    enabled = true,
    buftype_exclude = { "terminal", "nofile" },
    filetype_exclude = {
      "help",
      "startify",
      "dashboard",
      "lazy",
      "neogitstatus",
      "NvimTree",
      "Trouble",
      "text",
    },
    char = lvim.icons.ui.LineLeft,
    context_char = lvim.icons.ui.LineLeft,
    show_trailing_blankline_indent = false,
    show_first_indent_level = true,
    use_treesitter = true,
    show_current_context = true,
  }
  lvim.builtin.indentlines = require("lvim.core.builtins").add_completion "indentlines"
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.opts)
end

return M