From 3a1bb7c16c3b4efed6ca281017dcc94c48be5f2d Mon Sep 17 00:00:00 2001 From: triethyl Date: Sun, 24 Aug 2025 11:51:30 -0400 Subject: neovim: finished statusline and more --- pkgs/custom-neovim/config/lua/plugins/heirline.lua | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'pkgs/custom-neovim/config/lua/plugins/heirline.lua') diff --git a/pkgs/custom-neovim/config/lua/plugins/heirline.lua b/pkgs/custom-neovim/config/lua/plugins/heirline.lua index bc0a503..6160c94 100644 --- a/pkgs/custom-neovim/config/lua/plugins/heirline.lua +++ b/pkgs/custom-neovim/config/lua/plugins/heirline.lua @@ -1,5 +1,6 @@ return { "heirline.nvim", + enabled = false, lazy = false, after = function () -- Extra stuff from heirline. @@ -206,7 +207,26 @@ return { hl = { fg = "blue", bold = true }, } - -- Git component. + -- Git branch component. + components.git_branch = { + -- condition = conditions.is_git_repo, + -- + -- init = function (self) + -- self.branch = vim.b.minigit_summary.head_name or nil + -- end, + + provider = function (self) + local branch = vim.b.minigit_summary.head_name or nil + if branch then + local icon = using_icons and " " or "branch: " + return icon .. branch + else + return "none" + end + end + } + + -- Git status component. components.git_status = { condition = conditions.is_git_repo, @@ -286,7 +306,7 @@ return { -- Assemble statusline. local statusline = { components.mode, space, - components.git, space, + components.git_branch, space, components.cwd, space, components.diagnostics, -- cgit v1.2.3