aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorChris Kipp <ckipp@pm.me>2022-05-31 13:19:45 +0200
committerGitHub <noreply@github.com>2022-05-31 13:19:45 +0200
commit1a20aed3fb35e00f96aa18abb69d35912c9e119d (patch)
treefb7fb0dc69a723726fe42f81a0794205b7dd153a /runtime/lua/vim/lsp/handlers.lua
parentbfc85eab1213fcb5d6db2c12f193178773ba205c (diff)
downloadrneovim-1a20aed3fb35e00f96aa18abb69d35912c9e119d.tar.gz
rneovim-1a20aed3fb35e00f96aa18abb69d35912c9e119d.tar.bz2
rneovim-1a20aed3fb35e00f96aa18abb69d35912c9e119d.zip
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`.
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua2
1 files changed, 2 insertions, 0 deletions
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