chore(lualine): replace custom branch name with default with options

This commit is contained in:
Simon Lasbrugnas 2024-11-12 12:03:13 +01:00
parent a8b176df95
commit 290fffe503
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -1,13 +1,3 @@
local branch_name = vim.fn.system("git branch --show-current | tr -d '\n'")
local function branch()
if branch_name ~= "" then
return branch_name .. ''
else
return ""
end
end
require("lualine").setup({ require("lualine").setup({
options = { options = {
icons_enabled = true, icons_enabled = true,
@ -30,7 +20,7 @@ require("lualine").setup({
}, },
sections = { sections = {
lualine_a = { "mode" }, lualine_a = { "mode" },
lualine_b = { branch, "diff", "diagnostics" }, lualine_b = { {'branch', icon = {'', align='right'}} , "diff", "diagnostics" },
lualine_c = { "filename" }, lualine_c = { "filename" },
lualine_x = { "filetype" }, lualine_x = { "filetype" },
lualine_y = {}, lualine_y = {},