From eba121cc651413d753f688162413008a6ed455e2 Mon Sep 17 00:00:00 2001 From: LostNeophyte Date: Wed, 25 Jan 2023 11:06:39 +0100 Subject: refactor: use callbacks for configuring builtins --- lua/lvim/core/indentlines.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lua/lvim/core/indentlines.lua') diff --git a/lua/lvim/core/indentlines.lua b/lua/lvim/core/indentlines.lua index 3097daf8..d0716a4c 100644 --- a/lua/lvim/core/indentlines.lua +++ b/lua/lvim/core/indentlines.lua @@ -1,9 +1,7 @@ local M = {} M.config = function() - lvim.builtin.indentlines = { - active = true, - on_config_done = nil, + local config = { options = { enabled = true, buftype_exclude = { "terminal", "nofile" }, @@ -25,6 +23,8 @@ M.config = function() show_current_context = true, }, } + ---@cast config +LvimBuiltin + lvim.builtin.indentlines = config end M.setup = function() @@ -34,10 +34,6 @@ M.setup = function() 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 -- cgit v1.2.3