Skip to content

Commit b7a04fb

Browse files
committed
refactor(component)!: change defaults for file_info component
1 parent b4d1825 commit b7a04fb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lua/astroui/status/component.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ function M.fill(opts) return extend_tbl({ provider = provider.fill() }, opts) en
3535
-- @usage local heirline_component = require("astroui.status").component.file_info()
3636
function M.file_info(opts)
3737
opts = extend_tbl({
38-
file_icon = { hl = hl.file_icon "statusline", padding = { left = 1, right = 1 } },
39-
filename = {},
40-
file_modified = { padding = { left = 1 } },
41-
file_read_only = { padding = { left = 1 } },
38+
file_icon = { hl = hl.file_icon "statusline", padding = { left = 1, right = 1 }, condition = condition.is_file },
39+
filename = false,
40+
filetype = {},
41+
file_modified = false,
42+
file_read_only = { padding = { left = 1, right = 1 }, condition = condition.is_file },
4243
surround = { separator = "left", color = "file_info_bg", condition = condition.has_filetype },
4344
hl = hl.get_attributes "file_info",
4445
}, opts)
@@ -63,6 +64,8 @@ function M.tabline_file_info(opts)
6364
condition = function(self) return not self._show_picker end,
6465
hl = hl.file_icon "tabline",
6566
},
67+
filename = {},
68+
filetype = false,
6669
unique_path = {
6770
hl = function(self) return hl.get_attributes(self.tab_type .. "_path") end,
6871
},

0 commit comments

Comments
 (0)