indentlines.lua 902 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. local M = {}
  2. M.config = function()
  3. lvim.builtin.indentlines = {
  4. active = true,
  5. on_config_done = nil,
  6. options = {
  7. enabled = true,
  8. buftype_exclude = { "terminal", "nofile" },
  9. filetype_exclude = {
  10. "help",
  11. "startify",
  12. "dashboard",
  13. "packer",
  14. "neogitstatus",
  15. "NvimTree",
  16. "Trouble",
  17. "text",
  18. },
  19. char = lvim.icons.ui.LineLeft,
  20. show_trailing_blankline_indent = false,
  21. show_first_indent_level = true,
  22. use_treesitter = true,
  23. show_current_context = true,
  24. },
  25. }
  26. end
  27. M.setup = function()
  28. local status_ok, indent_blankline = pcall(reload, "indent_blankline")
  29. if not status_ok then
  30. return
  31. end
  32. indent_blankline.setup(lvim.builtin.indentlines.options)
  33. if lvim.builtin.indentlines.on_config_done then
  34. lvim.builtin.indentlines.on_config_done()
  35. end
  36. end
  37. return M