summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/options.lua
diff options
context:
space:
mode:
authorShadman <shadmansaleh3@gmail.com>2025-07-07 05:17:06 +0600
committerGitHub <noreply@github.com>2025-07-06 16:17:06 -0700
commit5973328edaedb04425e2f6cb63b2efab4aeb5fcb (patch)
treedb4d91443f6c7357ff60631b5bb187de038608fc /runtime/lua/vim/_meta/options.lua
parent6fd2a3040f7d6b522d403b66ad34e0710235052a (diff)
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 'runtime/lua/vim/_meta/options.lua')
-rw-r--r--runtime/lua/vim/_meta/options.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 962f5d6812..60715def3e 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -664,6 +664,14 @@ vim.o.bt = vim.o.buftype
vim.bo.buftype = vim.o.buftype
vim.bo.bt = vim.bo.buftype
+--- 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.
+---
+--- @type integer
+vim.o.busy = 0
+vim.bo.busy = vim.o.busy
+
--- Specifies details about changing the case of letters. It may contain
--- these words, separated by a comma:
--- internal Use internal case mapping functions, the current
@@ -6853,7 +6861,7 @@ vim.wo.stc = vim.wo.statuscolumn
---
---
--- @type string
-vim.o.statusline = "%<%f %h%w%m%r %=%{% &showcmdloc == 'statusline' ? '%-10.S ' : '' %}%{% exists('b:keymap_name') ? '<'..b:keymap_name..'> ' : '' %}%{% &ruler ? ( &rulerformat == '' ? '%-14.(%l,%c%V%) %P' : &rulerformat ) : '' %}"
+vim.o.statusline = "%<%f %h%w%m%r %=%{% &showcmdloc == 'statusline' ? '%-10.S ' : '' %}%{% exists('b:keymap_name') ? '<'..b:keymap_name..'> ' : '' %}%{% &busy > 0 ? '◐ ' : '' %}%{% &ruler ? ( &rulerformat == '' ? '%-14.(%l,%c%V%) %P' : &rulerformat ) : '' %}"
vim.o.stl = vim.o.statusline
vim.wo.statusline = vim.o.statusline
vim.wo.stl = vim.wo.statusline