feat: updated fzf extension to new api

This commit is contained in:
hoob3rt 2021-03-13 00:52:28 +01:00
parent 4bf5e247ff
commit ccca56d057
1 changed files with 12 additions and 12 deletions

View File

@ -2,19 +2,19 @@
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
local function fzf_statusline() local function fzf_statusline()
vim.cmd([[hi clear fzf1]]) return 'FZF'
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#]])
end end
local function load_extension() local M = {}
_G.fzf_statusline = fzf_statusline
vim.cmd(([[autocmd! User FzfStatusLine setlocal statusline=%!v:lua.fzf_statusline()]]))
end
return { M.sections = {
load_extension = load_extension lualine_a = { fzf_statusline },
} }
M.inactive_sections = {
lualine_a = { fzf_statusline },
}
M.filetypes = { 'fzf' }
return M