diff --git a/lua/lualine/extensions/quickfix.lua b/lua/lualine/extensions/quickfix.lua index 0e87a35..11c3f5b 100644 --- a/lua/lualine/extensions/quickfix.lua +++ b/lua/lualine/extensions/quickfix.lua @@ -18,6 +18,11 @@ end local M = {} +function M.init() + -- Make sure ft wf doesn't create a custom statusline + vim.g.qf_disable_statusline = true +end + M.sections = { lualine_a = {label}, lualine_b = {title}, diff --git a/lua/lualine/utils/loader.lua b/lua/lualine/utils/loader.lua index e87eddc..ece9bd6 100644 --- a/lua/lualine/utils/loader.lua +++ b/lua/lualine/utils/loader.lua @@ -52,12 +52,18 @@ local function load_extensions(config) if local_extension.inactive_sections then load_sections(local_extension.inactive_sections, config.options) end + if type(local_extension.init) == 'function' then + local_extension.init() + end config.extensions[index] = local_extension elseif type(extension) == 'table' then load_sections(extension.sections, config.options) if extension.inactive_sections then load_sections(extension.inactive_sections, config.options) end + if type(local_extension.init) == 'function' then + local_extension.init() + end config.extensions[index] = extension end end