2022-02-28 14:54:52 +00:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
function M.config()
|
|
|
|
local status_ok, indent_blankline = pcall(require, "indent_blankline")
|
|
|
|
if not status_ok then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
vim.g.indentLine_enabled = 1
|
|
|
|
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
2022-03-01 00:29:01 +00:00
|
|
|
vim.g.indent_blankline_show_first_indent_level = true
|
2022-02-28 14:54:52 +00:00
|
|
|
vim.g.indent_blankline_use_treesitter = true
|
|
|
|
vim.g.indent_blankline_char = "▏"
|
|
|
|
vim.g.indent_blankline_buftype_exclude = {
|
|
|
|
"nofile",
|
|
|
|
"terminal",
|
|
|
|
"lsp-installer",
|
|
|
|
"lspinfo",
|
|
|
|
}
|
|
|
|
vim.g.indent_blankline_filetype_exclude = {
|
|
|
|
"help",
|
|
|
|
"startify",
|
|
|
|
"dashboard",
|
|
|
|
"packer",
|
|
|
|
"neogitstatus",
|
|
|
|
"NvimTree",
|
|
|
|
"Trouble",
|
|
|
|
}
|
|
|
|
vim.g.indent_blankline_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",
|
|
|
|
}
|
|
|
|
|
|
|
|
indent_blankline.setup {
|
2022-03-01 00:29:01 +00:00
|
|
|
show_current_context = false,
|
2022-02-28 14:54:52 +00:00
|
|
|
show_current_context_start = false,
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|
|
|
|
|