indentlines.lua 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. "lazy",
  14. "neogitstatus",
  15. "NvimTree",
  16. "Trouble",
  17. "text",
  18. },
  19. char = lvim.icons.ui.LineLeft,
  20. context_char = lvim.icons.ui.LineLeft,
  21. show_trailing_blankline_indent = false,
  22. show_first_indent_level = true,
  23. use_treesitter = true,
  24. show_current_context = true,
  25. },
  26. }
  27. end
  28. M.setup = function()
  29. local status_ok, indent_blankline = pcall(require, "indent_blankline")
  30. if not status_ok then
  31. return
  32. end
  33. indent_blankline.setup(lvim.builtin.indentlines.options)
  34. if lvim.builtin.indentlines.on_config_done then
  35. lvim.builtin.indentlines.on_config_done()
  36. end
  37. end
  38. return M