Include active venv path in lualine

This commit is contained in:
Daniel McKnight 2025-06-03 23:27:34 -07:00
parent d02c29901c
commit c072a4d074

View file

@ -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" },
},
})