diff options
| author | triethyl <triethylammonium@pm.me> | 2025-08-05 22:23:24 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-08-05 22:23:24 -0400 |
| commit | e7fc04e57690eaa993b0d4219fb96355ed65e5cd (patch) | |
| tree | 149909503ef61271b74fc9cded8bc8d7eaaa2361 /pkgs | |
| parent | 6a066d077feb6bed1c4a324c969b19773571e690 (diff) | |
neovim: add git status statusline component
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/statusline.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/custom-neovim/config/lua/statusline.lua b/pkgs/custom-neovim/config/lua/statusline.lua index 1e5c708..5fcf7eb 100644 --- a/pkgs/custom-neovim/config/lua/statusline.lua +++ b/pkgs/custom-neovim/config/lua/statusline.lua @@ -158,6 +158,14 @@ statusline_components.git_branch = function() end end +statusline_components.git_status = function() + if vim.b.gitsigns_status then + return string.format(' %s ', vim.b.gitsigns_status) + else + return '' + end +end + statusline_components.working_directory = function() local text = vim.fn.getcwd() @@ -198,6 +206,7 @@ local statusline = { get_component("mode"), get_component("working_directory"), get_component("git_branch"), + get_component("git_status"), get_component("diagnostic_status"), get_component("spacer"), |
