nvim/lua/plugins/indent-blankline.lua

54 lines
1.0 KiB
Lua
Raw Normal View History

2022-10-09 22:40:29 +02:00
local M = {}
M.event = "BufReadPre"
function M.config()
local indent = require("indent_blankline")
--- PERF: debounce indent-blankline refresh
2022-10-12 17:55:25 +02:00
--local refresh = indent.refresh
--indent.refresh = require("util").debounce(100, refresh)
2022-10-09 22:40:29 +02:00
indent.setup({
buftype_exclude = { "terminal", "nofile" },
filetype_exclude = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"neo-tree",
"Trouble",
},
char = "",
use_treesitter_scope = false,
show_trailing_blankline_indent = false,
show_current_context = true,
context_patterns = {
"class",
"return",
"function",
"method",
"^if",
"^while",
"jsx_element",
"^for",
"^object",
"^table",
"block",
"arguments",
"if_statement",
"else_clause",
"jsx_element",
"jsx_self_closing_element",
"try_statement",
"catch_clause",
"import_statement",
"operation_type",
},
})
end
return M