LunarVim/lua/lvim/core/indentlines.lua
LostNeophyte 978ff7c24d
perf(treesitter): disable in big files (#3268)
* perf(treesitter): disable in big files
* fix: disable `use_treesitter` in indentlines and remove vim.schedule
* refactor(treesitter): use `vim.schedule`
* perf: set nocursorline in big json files
* perf: disable more things in big files
* chore: format
2022-11-01 10:37:50 +01:00

42 lines
904 B
Lua

local M = {}
M.config = function()
lvim.builtin.indentlines = {
active = true,
on_config_done = nil,
options = {
enabled = true,
buftype_exclude = { "terminal", "nofile" },
filetype_exclude = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"Trouble",
"text",
},
char = lvim.icons.ui.LineLeft,
show_trailing_blankline_indent = false,
show_first_indent_level = true,
use_treesitter = false,
show_current_context = false,
},
}
end
M.setup = function()
local status_ok, indent_blankline = pcall(reload, "indent_blankline")
if not status_ok then
return
end
indent_blankline.setup(lvim.builtin.indentlines.options)
if lvim.builtin.indentlines.on_config_done then
lvim.builtin.indentlines.on_config_done()
end
end
return M