|
7 | 7 | --- Should we attach to new windows?
|
8 | 8 | ---@field enable boolean
|
9 | 9 | ---
|
10 |
| ---- List of attached windows. |
| 10 | +--- State of attached windows. |
| 11 | +--- true -> Attached & rendering. |
| 12 | +--- false -> Attached only. |
11 | 13 | ---@field attached_windows table<integer, boolean>
|
12 | 14 |
|
13 | 15 | -----------------------------------------------------------------------------
|
|
37 | 39 | ---| statusline.parts.diagnostics
|
38 | 40 | ---| statusline.parts.branch
|
39 | 41 | ---| statusline.parts.bufname
|
| 42 | +---| statusline.parts.custom |
40 | 43 |
|
41 | 44 | -----------------------------------------------------------------------------
|
42 | 45 |
|
43 | 46 | --- Shows current git branch.
|
44 | 47 | ---@class statusline.parts.branch
|
45 | 48 | ---
|
46 |
| ---- Optional condition for this component. |
| 49 | +--- Optional condition for this part. |
47 | 50 | ---@field condition? boolean | fun(buffer: integer, window: integer): boolean
|
48 | 51 | ---
|
49 |
| ---- What kind of component is this? |
| 52 | +--- What kind of part is this? |
50 | 53 | ---@field kind "branch"
|
51 | 54 | ---
|
52 | 55 | --- Delay(in milliseconds) between branch
|
|
61 | 64 | ---@field [string] branch.opts
|
62 | 65 |
|
63 | 66 |
|
64 |
| ---- Git branch component options. |
| 67 | +--- Git branch part options. |
65 | 68 | --- Drawn like so,
|
66 | 69 | ---
|
67 | 70 | ---```txt
|
|
100 | 103 | --- Shows buffer name.
|
101 | 104 | ---@class statusline.parts.bufname
|
102 | 105 | ---
|
103 |
| ---- Optional condition for this component. |
| 106 | +--- Optional condition for this part. |
104 | 107 | ---@field condition? boolean | fun(buffer: integer, window: integer): boolean
|
105 | 108 | ---
|
106 |
| ---- What kind of component is this? |
| 109 | +--- What kind of part is this? |
107 | 110 | ---@field kind "bufname"
|
108 | 111 | ---
|
109 | 112 | --- Maximum name length.
|
|
116 | 119 | ---@field [string] bufname.opts
|
117 | 120 |
|
118 | 121 |
|
119 |
| ---- Buffer name component options. |
| 122 | +--- Buffer name part options. |
120 | 123 | --- Drawn like so,
|
121 | 124 | ---
|
122 | 125 | ---```txt
|
|
161 | 164 | --- Shows diagnostics count.
|
162 | 165 | ---@class statusline.parts.diagnostics
|
163 | 166 | ---
|
164 |
| ---- Optional condition for this component. |
| 167 | +--- Optional condition for this part. |
165 | 168 | ---@field condition? boolean | fun(buffer: integer, window: integer): boolean
|
166 | 169 | ---
|
167 |
| ---- What kind of component is this? |
| 170 | +--- What kind of part is this? |
168 | 171 | ---@field kind "diagnostics"
|
169 | 172 | ---
|
170 |
| ---- Should this component be automatically hidden? |
| 173 | +--- Should this part be automatically hidden? |
171 | 174 | ---
|
172 |
| ---- > This component gets hidden if a buffer has |
| 175 | +--- > This part gets hidden if a buffer has |
173 | 176 | --- > no client attached to it.
|
174 | 177 | ---@field auto_hide? boolean
|
175 | 178 | ---
|
|
211 | 214 | --- Highlight group for the separator.
|
212 | 215 | ---@field separator_hl? string
|
213 | 216 | ---
|
214 |
| ---- Left corner of the component. |
| 217 | +--- Left corner of the part. |
215 | 218 | ---@field corner_left? string
|
216 | 219 | ---@field corner_left_hl? string
|
217 | 220 | ---
|
218 |
| ---- Left padding of the component. |
| 221 | +--- Left padding of the part. |
219 | 222 | ---@field padding_left? string
|
220 | 223 | ---@field padding_left_hl? string
|
221 | 224 | ---
|
222 |
| ---- Right padding of the component. |
| 225 | +--- Right padding of the part. |
223 | 226 | ---@field padding_right? string
|
224 | 227 | ---@field padding_right_hl? string
|
225 | 228 | ---
|
226 |
| ---- Right corner of the component. |
| 229 | +--- Right corner of the part. |
227 | 230 | ---@field corner_right? string
|
228 | 231 | ---@field corner_right_hl? string
|
229 | 232 | ---
|
230 |
| ---- Primary highlight group for the component |
| 233 | +--- Primary highlight group for the part |
231 | 234 | ---@field hl? string
|
232 | 235 |
|
233 | 236 | -----------------------------------------------------------------------------
|
234 | 237 |
|
235 | 238 | --- Empty space.
|
236 | 239 | ---@class statusline.parts.empty
|
237 | 240 | ---
|
238 |
| ---- Optional condition for this component. |
| 241 | +--- Optional condition for this part. |
239 | 242 | ---@field condition? boolean | fun(buffer: integer, window: integer): boolean
|
240 | 243 | ---
|
241 |
| ---- What kind of component is this? |
| 244 | +--- What kind of part is this? |
242 | 245 | ---@field kind "empty"
|
243 | 246 | ---
|
244 |
| ---- Highlight group for this component. |
| 247 | +--- Highlight group for this part. |
245 | 248 | ---@field hl? string
|
246 | 249 |
|
247 | 250 | -----------------------------------------------------------------------------
|
248 | 251 |
|
249 | 252 | --- Shows current mode.
|
250 | 253 | ---@class statusline.parts.mode
|
251 | 254 | ---
|
252 |
| ---- Optional condition for this component. |
| 255 | +--- Optional condition for this part. |
253 | 256 | ---@field condition? boolean | fun(buffer: integer, window: integer): boolean
|
254 | 257 | ---
|
255 |
| ---- What kind of component is this? |
| 258 | +--- What kind of part is this? |
256 | 259 | ---@field kind "mode"
|
257 | 260 | ---
|
258 | 261 | --- Should we show a compact version?
|
|
262 | 265 | ---@field [string] mode.opts
|
263 | 266 |
|
264 | 267 |
|
265 |
| ---- Mode name component options. |
| 268 | +--- Mode name part options. |
266 | 269 | --- Drawn like so,
|
267 | 270 | ---
|
268 | 271 | ---```txt
|
|
311 | 314 | --- └ corner_left
|
312 | 315 | ---@class statusline.parts.section
|
313 | 316 | ---
|
314 |
| ---- Condition for this component. |
| 317 | +--- Condition for this part. |
315 | 318 | ---@field condition? fun(buffer: integer, window: integer): boolean
|
316 | 319 | ---
|
317 |
| ---- What kind of component is this? |
| 320 | +--- What kind of part is this? |
318 | 321 | ---@field kind? "section"
|
319 | 322 | ---
|
320 | 323 | --- Reference to a click handler.
|
|
346 | 349 | --- Custom ruler.
|
347 | 350 | ---@class statusline.parts.ruler
|
348 | 351 | ---
|
349 |
| ---- Optional condition for this component. |
| 352 | +--- Optional condition for this part. |
350 | 353 | ---@field condition? boolean | fun(buffer: integer, window: integer): boolean
|
351 | 354 | ---
|
352 |
| ---- What kind of component is this? |
| 355 | +--- What kind of part is this? |
353 | 356 | ---@field kind "ruler"
|
354 | 357 | ---
|
355 | 358 | --- Should visual modes be shown
|
|
365 | 368 | ---@field visual ruler.opts
|
366 | 369 |
|
367 | 370 |
|
368 |
| ---- Ruler component options. |
| 371 | +--- Ruler part options. |
369 | 372 | --- Drawn like so,
|
370 | 373 | ---
|
371 | 374 | ---```txt
|
|
402 | 405 | --- Primary highlight group.
|
403 | 406 | ---@field hl? string
|
404 | 407 |
|
| 408 | + |
| 409 | +--- Custom statusline part. |
| 410 | +---@class statusline.parts.custom |
| 411 | +--- |
| 412 | +--- Optional condition for this part. |
| 413 | +---@field condition? boolean | fun(buffer: integer, window: integer): boolean |
| 414 | +--- |
| 415 | +--- What kind of part is this? |
| 416 | +---@field kind "ruler" |
| 417 | +--- |
| 418 | +--- Text to show for this part. |
| 419 | +---@field value fun(buffer: integer, window: integer): string |
| 420 | + |
0 commit comments