From c072a4d074c037239b0dec34a3a942a03c8eb84c Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 3 Jun 2025 23:27:34 -0700 Subject: [PATCH] Include active venv path in lualine --- .config/nvim/lua/plugins/chrome.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/plugins/chrome.lua b/.config/nvim/lua/plugins/chrome.lua index 2e262c5..23301dc 100644 --- a/.config/nvim/lua/plugins/chrome.lua +++ b/.config/nvim/lua/plugins/chrome.lua @@ -14,7 +14,18 @@ return { lualine_b = { "branch", "diff", "diagnostics" }, lualine_c = { "filename" }, lualine_x = { "encoding", "filetype" }, - lualine_y = { "progress" }, + lualine_y = { + function() + -- Display an active Python virtual environment if active + local venv = os.getenv("VIRTUAL_ENV") + if venv then + return vim.fn.fnamemodify(venv, ":t") + -- Put other useful paths here as available + else + return "" + end + end, + }, lualine_z = { "location" }, }, })