mirror of
https://github.com/neovim/neovim.git
synced 2026-05-05 21:45:05 +00:00
LSP: implement window/workDoneProgress/create (#13640)
This commit is contained in:
committed by
GitHub
parent
52163c66b9
commit
fb90b6ec98
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user