Skip to content

Commit 529da96

Browse files
committed
chore: Added some type definitions
1 parent da07b21 commit 529da96

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

lua/bars/tabline.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
--- Custom tabline module
12
local tabline = {}
23
local components = require("bars.components.tabline");
34

@@ -7,10 +8,10 @@ local TBL = "%!v:lua.require('bars.tabline').render()";
78

89
---@class tabline.config
910
tabline.config = {
10-
---|fS
11-
1211
default = {
1312
parts = {
13+
---|fS
14+
1415
{ kind = "empty", hl = "Normal" },
1516
{
1617
kind = "tabs",
@@ -111,10 +112,10 @@ tabline.config = {
111112
}
112113
},
113114
{ kind = "empty", hl = "Normal" },
115+
116+
---|fE
114117
}
115118
}
116-
117-
---|fE
118119
};
119120

120121
---@type tabline.state
@@ -146,7 +147,7 @@ tabline.update_id = function ()
146147

147148
if tmp.condition == true then
148149
ID = key;
149-
elseif pcall(tmp.condition) and tmp.condition() == true then
150+
elseif pcall(tmp.condition --[[ @as fun():boolean ]]) and tmp.condition() == true then
150151
ID = key;
151152
end
152153

0 commit comments

Comments
 (0)