feat(progress): set Progress-event pattern to "source" #38495

Problem:
Currently, there's no way to distinguish progress messages coming from
different sources. Nor can Progress event be easily filtered based on
source.

Solution:
- Add "source" field to nvim_echo-opts.
- The Progress event pattern is now defined by the "source" field.
- Include the "title" as ev.data.
- Unrelated change: set force=false to disable nesting.
This commit is contained in:
Shadman
2026-03-27 16:24:14 +06:00
committed by GitHub
parent 925e9e8722
commit 4b643d7068
10 changed files with 55 additions and 23 deletions

View File

@@ -1139,6 +1139,7 @@ function vim.api.nvim_del_var(name) end
--- - kind (`string?`) Decides the `ui-messages` kind in the emitted message. Set "progress"
--- to emit a `progress-message`.
--- - percent (`integer?`) `progress-message` percentage.
--- - source (`string?`) `progress-message` source.
--- - status (`string?`) `progress-message` status:
--- - "success": Process completed successfully.
--- - "running": Process is ongoing.

View File

@@ -242,6 +242,7 @@ error('Cannot require a meta file')
--- @field title? string
--- @field status? string
--- @field percent? integer
--- @field source? string
--- @field data? table<string,any>
--- @class vim.api.keyset.empty