indent-blankline.lua 826 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. local status, ident_blankline = pcall(require, "indent_blankline")
  2. if not status then
  3. vim.notify("没有找到 indent_blankline")
  4. return
  5. end
  6. ident_blankline.setup({
  7. -- 空行占位
  8. space_char_blankline = " ",
  9. -- 用 treesitter 判断上下文
  10. show_current_context = true,
  11. show_current_context_start = true,
  12. context_patterns = {
  13. "class",
  14. "function",
  15. "method",
  16. "element",
  17. "^if",
  18. "^while",
  19. "^for",
  20. "^object",
  21. "^table",
  22. "block",
  23. "arguments",
  24. },
  25. -- :echo &filetype
  26. filetype_exclude = {
  27. "dashboard",
  28. "packer",
  29. "terminal",
  30. "help",
  31. "log",
  32. "markdown",
  33. "TelescopePrompt",
  34. "lsp-installer",
  35. "lspinfo",
  36. "toggleterm",
  37. },
  38. -- 竖线样式
  39. -- char = '¦'
  40. -- char = '┆'
  41. -- char = '│'
  42. -- char = "⎸",
  43. char = "▏",
  44. })