From ccca56d05706fe8376f25d1e00c82816fc7d35e1 Mon Sep 17 00:00:00 2001 From: hoob3rt Date: Sat, 13 Mar 2021 00:52:28 +0100 Subject: [PATCH] feat: updated fzf extension to new api --- lua/lualine/extensions/fzf.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lua/lualine/extensions/fzf.lua b/lua/lualine/extensions/fzf.lua index d1ebbda..73f5835 100644 --- a/lua/lualine/extensions/fzf.lua +++ b/lua/lualine/extensions/fzf.lua @@ -2,19 +2,19 @@ -- MIT license, see LICENSE for more details. local function fzf_statusline() - vim.cmd([[hi clear fzf1]]) - vim.cmd([[hi link fzf1 lualine_a_normal]]) - vim.cmd([[hi clear fzf2]]) - vim.cmd([[hi link fzf2 lualine_c_normal]]) - return ([[%#fzf1# FZF %#fzf2#]]) - + return 'FZF' end -local function load_extension() - _G.fzf_statusline = fzf_statusline - vim.cmd(([[autocmd! User FzfStatusLine setlocal statusline=%!v:lua.fzf_statusline()]])) -end +local M = {} -return { - load_extension = load_extension +M.sections = { + lualine_a = { fzf_statusline }, } + +M.inactive_sections = { + lualine_a = { fzf_statusline }, +} + +M.filetypes = { 'fzf' } + +return M