lualine.nvim/lua/lualine/components/special/functon_component.lua
Shadman aa844a9555
BugFix: Fix function component not working (#175)
When the provided function takes an optional argument the previous
implementation causes error.
2021-04-13 23:09:01 +06:00

9 lines
237 B
Lua

local FunctionComponent = require('lualine.component'):new()
FunctionComponent.update_status = function(self)
-- 1st element in options table is the function provided by config
return self.options[1]()
end
return FunctionComponent