You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I'd like is if we could give the possibility to sidebars to use their space in the barbar. We already have all the logic in place, so they could just give us a list of { hl: string, text: string } (possibly including click handlers) and we'd run with it.
The text was updated successfully, but these errors were encountered:
romgrk
changed the title
Expose an API for sidebars
Expose an API for custom sections
Apr 3, 2023
Been thinking about it, should be possible to do something like this:
--- @aliasgenerate_offset_nodefun(user_options: …): string hl, string text--- @aliasgenerate_buffer_nodefun(index: …, bufnr: …, icons_options: …): string hl, string text--- @classnodes--- @fieldprovidergenerate_offset_node|generate_buffer_node--- @fieldpriority? integer higher priority nodes get shown first (i.e. further to the left)barbar_nodes= {
left= {}, --- left (e.g. sidebar offset)buffers= {
left= {}, --- left edge of buffermiddle= {}, --- in the middle of the padding (e.g. filename)right= {}, --- right edge of buffer (e.g. close button)
},
right= {}, --- right (e.g. sidebar offset)
}
We could even refactor render to use this internal list instead of iterating over all our options even if some are disabled, and then expose api options to insert them.
One thing I'd like is if we could give the possibility to sidebars to use their space in the barbar. We already have all the logic in place, so they could just give us a list of
{ hl: string, text: string }
(possibly including click handlers) and we'd run with it.The text was updated successfully, but these errors were encountered: