Skip to content

Commit

Permalink
fix(heirline-vscode-winbar): add missing fallback key to path_func
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed May 3, 2024
1 parent fd3bac1 commit a751246
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lua/astrocommunity/recipes/heirline-vscode-winbar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ return {
"rebelot/heirline.nvim",
opts = function(_, opts)
local status = require "astroui.status"
local path_func = status.provider.filename { modify = ":.:h", fallback = "" }

opts.winbar = { -- create custom winbar
-- store the current buffer number
Expand All @@ -11,15 +12,10 @@ return {
{
condition = function() return not status.condition.is_active() end,
-- show the path to the file relative to the working directory
status.component.separated_path {
path_func = status.provider.filename { modify = ":.:h" },
},
status.component.separated_path { path_func = path_func },
-- add the file name and icon
status.component.file_info {
file_icon = {
hl = status.hl.file_icon "winbar",
padding = { left = 0 },
},
file_icon = { hl = status.hl.file_icon "winbar", padding = { left = 0 } },
filename = {},
filetype = false,
file_modified = false,
Expand All @@ -32,9 +28,7 @@ return {
-- active winbar
{
-- show the path to the file relative to the working directory
status.component.separated_path {
path_func = status.provider.filename { modify = ":.:h" },
},
status.component.separated_path { path_func = path_func },
-- add the file name and icon
status.component.file_info { -- add file_info to breadcrumbs
file_icon = { hl = status.hl.filetype_color, padding = { left = 0 } },
Expand Down

0 comments on commit a751246

Please sign in to comment.