Include active venv path in lualine
This commit is contained in:
parent
d02c29901c
commit
c072a4d074
1 changed files with 12 additions and 1 deletions
|
@ -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" },
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue