From fcb88aebba626367d8a8e4b0ae6c196bb474e7c9 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Fri, 13 Aug 2021 07:20:56 +0600 Subject: [PATCH] Fix: quickfix extention not apearing --- lua/lualine/extensions/quickfix.lua | 5 +++++ lua/lualine/utils/loader.lua | 6 ++++++ 2 files changed, 11 insertions(+) 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