Closed adigitoleo closed 6 months ago
Example use case: adding clock to the statusbar
let g:mellow_custom_parts = [
\ [function('strftime', ['%H:%M']), '%2*', 1, 0],
\]
Time only updates when leaving/entering the buffer, and maybe after a few other triggers? Could make it refresh every 'updatetime'
by setting g:time
and using that instead, and clearing the variable with a CursorHold
autocommand.
That's essentially how the mixed indent warning works right now.
Not sure if it is possible without way too much code. Since the fastest refresh is currently triggered by
CursorHold
, it is kind of slow... (default'updatetime'
is 4 seconds). Would need to check how lightline et al do this...Somehow, diagnostic components seem to refresh faster. Need to figure out the call stack...