From 1a20aed3fb35e00f96aa18abb69d35912c9e119d Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 31 May 2022 13:19:45 +0200 Subject: fix(lsp): include cancellable in progress message table (#18809) Currently the `title`, `message` and `percentage` is stored for a progress, but there is also an optional `cancellable` that comes in with both the `WorkDoneProgressBegin` and also `WorkDoneProgressReport`. This change also stores that value so that a plugin can access it when they do a lookup in `client.messages`. --- runtime/lua/vim/lsp/handlers.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index 61cc89dcac..935f4b64f8 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -40,10 +40,12 @@ local function progress_handler(_, result, ctx, _) if val.kind == 'begin' then client.messages.progress[token] = { title = val.title, + cancellable = val.cancellable, message = val.message, percentage = val.percentage, } elseif val.kind == 'report' then + client.messages.progress[token].cancellable = val.cancellable client.messages.progress[token].message = val.message client.messages.progress[token].percentage = val.percentage elseif val.kind == 'end' then -- cgit