Skip to content

Commit

Permalink
feat(heirline): add virtual environment component
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Apr 1, 2024
1 parent 7dea767 commit 7761b63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/astronvim/plugins/_astroui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ return {
DiagnosticInfo = "󰋼",
DiagnosticWarn = "",
Ellipsis = "",
Environment = "",
FileNew = "",
FileModified = "",
FileReadOnly = "",
Expand Down Expand Up @@ -79,6 +80,7 @@ return {
DiagnosticInfo = "i",
DiagnosticWarn = "!",
Ellipsis = "...",
Environment = "Env:",
FileModified = "*",
FileReadOnly = "[lock]",
FoldClosed = "+",
Expand Down
4 changes: 4 additions & 0 deletions lua/astronvim/plugins/_astroui_status.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ return {
macro_recording = { bold = true },
git_branch = { bold = true },
git_diff = { bold = true },
virtual_env = { bold = true },
},
icon_highlights = {
file_icon = {
Expand Down Expand Up @@ -148,6 +149,7 @@ return {
local Conditional = get_hlgroup("Conditional", { fg = color.bright_purple, bg = color.dark_bg })
local String = get_hlgroup("String", { fg = color.green, bg = color.dark_bg })
local TypeDef = get_hlgroup("TypeDef", { fg = color.yellow, bg = color.dark_bg })
local NvimEnvironmentName = get_hlgroup("NvimEnvironmentName", { fg = color.yellow, bg = color.dark_bg })
local GitSignsAdd = get_hlgroup("GitSignsAdd", { fg = color.green, bg = color.dark_bg })
local GitSignsChange = get_hlgroup("GitSignsChange", { fg = color.orange, bg = color.dark_bg })
local GitSignsDelete = get_hlgroup("GitSignsDelete", { fg = color.bright_red, bg = color.dark_bg })
Expand Down Expand Up @@ -176,6 +178,7 @@ return {
git_branch_fg = Conditional.fg,
mode_fg = StatusLine.bg,
treesitter_fg = String.fg,
virtual_env_fg = NvimEnvironmentName.fg,
scrollbar = TypeDef.fg,
git_added = GitSignsAdd.fg,
git_changed = GitSignsChange.fg,
Expand Down Expand Up @@ -238,6 +241,7 @@ return {
"cmd_info",
"treesitter",
"nav",
"virtual_env",
} do
if not colors[section .. "_bg"] then colors[section .. "_bg"] = colors["section_bg"] end
if not colors[section .. "_fg"] then colors[section .. "_fg"] = colors["section_fg"] end
Expand Down
1 change: 1 addition & 0 deletions lua/astronvim/plugins/heirline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ return {
status.component.cmd_info(),
status.component.fill(),
status.component.lsp(),
status.component.virtual_env(),
status.component.treesitter(),
status.component.nav(),
status.component.mode { surround = { separator = "right" } },
Expand Down

0 comments on commit 7761b63

Please sign in to comment.