diff options
Diffstat (limited to 'pkgs/custom-neovim/config/lua/statusline.lua')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/statusline.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/custom-neovim/config/lua/statusline.lua b/pkgs/custom-neovim/config/lua/statusline.lua index 1c1bc31..dc7bce7 100644 --- a/pkgs/custom-neovim/config/lua/statusline.lua +++ b/pkgs/custom-neovim/config/lua/statusline.lua @@ -253,17 +253,28 @@ components.tab_counter = function (args) return before..icon..current_tab_index.."/"..num_tabs..after end +components.session_name = function (args) + args = args or {} + local before = args.before or "" + local after = args.after or "" + + if not vim.g.loaded_auto_session then + return "" + end + + return before..require("auto-session.lib").current_session_name(true)..after +end + -- Define Statusline local statusline = function () return { components.mode({before = " "}), components.git_branch(), - -- components.git_status(), components.cwd(), "%=", - -- components.diagnostics(), + components.session_name(), components.tab_counter(), components.location({after = vim.g.neovide and " " or ""}), components.progress({after = ""}), |
