summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/statusline.lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-12-03 09:48:00 -0500
committertriethyl <triethylammonium@pm.me>2025-12-03 09:48:00 -0500
commitda2ae5f98aadc5f5bd3498854db9efd75fa1b6ab (patch)
tree061a0d13998f91210db13f1e99dd012ce4b05ca2 /pkgs/custom-neovim/config/lua/statusline.lua
parentdf154e4918a635e1c7052d332d25324773e13847 (diff)
neovim: many changes
Diffstat (limited to 'pkgs/custom-neovim/config/lua/statusline.lua')
-rw-r--r--pkgs/custom-neovim/config/lua/statusline.lua15
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 = ""}),