shadmansaleh c8750a35e0 enhance: allow components to be functions too (#81)
Some components like hostname, progress are so simple that
the component class setup is just unnecessary boilerplate.
Allowing them to be function simplifies things.
With this you can put your regular component functions in
~/.config/nvim/lua/lualine/components/ folder and treat then as
regular lualine components just like 'mode' or 'branch'.
Hopefully this will help lualine plugins grow.
2021-10-11 16:41:25 +06:00

8 lines
163 B
Lua

-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local function hostname()
return vim.loop.os_gethostname()
end
return hostname