diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2020-12-30 14:17:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 23:17:35 +0100 |
commit | fb90b6ec9803fdbd603b1d5f1685583218c18909 (patch) | |
tree | 5501559b18a22584eb73a0558c22c7c1156a9664 /runtime/lua/vim/lsp/handlers.lua | |
parent | 52163c66b936c21f00832af19fb438b6db6f9766 (diff) | |
download | rneovim-fb90b6ec9803fdbd603b1d5f1685583218c18909.tar.gz rneovim-fb90b6ec9803fdbd603b1d5f1685583218c18909.tar.bz2 rneovim-fb90b6ec9803fdbd603b1d5f1685583218c18909.zip |
LSP: implement window/workDoneProgress/create (#13640)
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r-- | runtime/lua/vim/lsp/handlers.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index 359573beb1..3db62f9dd8 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -63,8 +63,20 @@ local function progress_callback(_, _, params, client_id) vim.api.nvim_command("doautocmd <nomodeline> User LspProgressUpdate") end +--@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress M['$/progress'] = progress_callback +--@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#window_workDoneProgress_create +M['window/workDoneProgress/create'] = function(_, _, params, client_id) + local client = vim.lsp.get_client_by_id(client_id) + local token = params.token -- string or number + if not client then + err_message("LSP[", client_id, "] client has shut down after sending the message") + end + client.messages.progress[token] = {} + return vim.NIL +end + --@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction M['textDocument/codeAction'] = function(_, _, actions) if actions == nil or vim.tbl_isempty(actions) then |