mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
feat(options): per-buffer 'busy' status #34493
Problem: Plugins cannot mark a buffer as "busy". Solution: - Add a buffer-local 'busy' option. - Show a busy indicator in the default 'statusline'.
This commit is contained in:
@@ -950,6 +950,21 @@ local options = {
|
||||
type = 'string',
|
||||
varname = 'p_bt',
|
||||
},
|
||||
{
|
||||
defaults = 0,
|
||||
desc = [=[
|
||||
Sets a buffer "busy" status. Indicated in the default statusline.
|
||||
When busy status is larger then 0 busy flag is shown in statusline.
|
||||
The semantics of "busy" are arbitrary, typically decided by the plugin that owns the buffer.
|
||||
]=],
|
||||
full_name = 'busy',
|
||||
redraw = { 'statuslines' },
|
||||
noglob = true,
|
||||
scope = { 'buf' },
|
||||
short_desc = N_('buffer is busy'),
|
||||
type = 'number',
|
||||
varname = 'p_busy',
|
||||
},
|
||||
{
|
||||
abbreviation = 'cmp',
|
||||
defaults = 'internal,keepascii',
|
||||
@@ -8640,6 +8655,7 @@ local options = {
|
||||
'%=',
|
||||
"%{% &showcmdloc == 'statusline' ? '%-10.S ' : '' %}",
|
||||
"%{% exists('b:keymap_name') ? '<'..b:keymap_name..'> ' : '' %}",
|
||||
"%{% &busy > 0 ? '◐ ' : '' %}",
|
||||
"%{% &ruler ? ( &rulerformat == '' ? '%-14.(%l,%c%V%) %P' : &rulerformat ) : '' %}",
|
||||
}),
|
||||
desc = [=[
|
||||
|
Reference in New Issue
Block a user