From bddbb7095d2d4977dcf3259489a188eba9e2d321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 27 Sep 2021 15:43:18 +0800 Subject: `$/cancelRequest` returns code `RequestCancelled` --- script/provider/provider.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'script/provider/provider.lua') diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 070652ef..ff9296d6 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -684,7 +684,6 @@ proto.on('textDocument/semanticTokens/full', function (params) local uri = params.textDocument.uri await.close('textDocument/semanticTokens/full') await.setID('textDocument/semanticTokens/full') - await.setID('update:' .. uri) workspace.awaitReady() local _ = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_FULL, 0.5) local core = require 'core.semantic-tokens' @@ -702,7 +701,6 @@ proto.on('textDocument/semanticTokens/range', function (params) local uri = params.textDocument.uri await.close('textDocument/semanticTokens/range') await.setID('textDocument/semanticTokens/range') - await.setID('update:' .. uri) workspace.awaitReady() local _ = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5) local core = require 'core.semantic-tokens' @@ -806,7 +804,7 @@ proto.on('textDocument/onTypeFormatting', function (params) end) proto.on('$/cancelRequest', function (params) - await.close('proto:' .. params.id) + proto.close(params.id, define.ErrorCodes.RequestCancelled) end) proto.on('$/requestHint', function (params) -- cgit v1.2.3