2021-03-10 23:14:37 +00:00
|
|
|
-- Copyright (c) 2020-2021 hoob3rt
|
|
|
|
-- MIT license, see LICENSE for more details.
|
|
|
|
local M = {}
|
|
|
|
|
2021-05-10 16:27:39 +00:00
|
|
|
local function fugitive_branch()
|
2021-05-11 12:55:18 +00:00
|
|
|
local icon = '' -- e0a0
|
|
|
|
return icon .. ' ' .. vim.fn.FugitiveHead()
|
2021-05-10 16:27:39 +00:00
|
|
|
end
|
2021-09-03 18:28:20 +00:00
|
|
|
local empty = {
|
|
|
|
function()
|
|
|
|
return ' '
|
|
|
|
end,
|
2021-09-14 15:14:23 +00:00
|
|
|
padding = 0,
|
2021-09-03 18:28:20 +00:00
|
|
|
}
|
2021-08-26 19:01:42 +00:00
|
|
|
|
|
|
|
M.sections = {
|
2021-09-03 18:28:20 +00:00
|
|
|
lualine_a = { fugitive_branch },
|
|
|
|
lualine_c = { empty },
|
|
|
|
lualine_z = { 'location' },
|
2021-08-26 19:01:42 +00:00
|
|
|
}
|
2021-05-10 16:27:39 +00:00
|
|
|
|
2021-09-03 18:28:20 +00:00
|
|
|
M.filetypes = { 'fugitive' }
|
2021-03-10 23:14:37 +00:00
|
|
|
|
|
|
|
return M
|