diff options
| author | Shadman <shadmansaleh3@gmail.com> | 2025-07-07 05:17:06 +0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-06 16:17:06 -0700 |
| commit | 5973328edaedb04425e2f6cb63b2efab4aeb5fcb (patch) | |
| tree | db4d91443f6c7357ff60631b5bb187de038608fc /src/nvim/options.lua | |
| parent | 6fd2a3040f7d6b522d403b66ad34e0710235052a (diff) | |
| download | rneovim-5973328edaedb04425e2f6cb63b2efab4aeb5fcb.tar.gz rneovim-5973328edaedb04425e2f6cb63b2efab4aeb5fcb.tar.bz2 rneovim-5973328edaedb04425e2f6cb63b2efab4aeb5fcb.zip | |
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'.
Diffstat (limited to 'src/nvim/options.lua')
| -rw-r--r-- | src/nvim/options.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index bc21674204..d320e0928a 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -951,6 +951,21 @@ local options = { 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', values = { '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 = [=[ |