summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-24 17:20:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-24 17:20:52 +0800
commite5a094cfc9ecaaea9873905b37658b9227c8fe99 (patch)
treed74fac0c3eea4c21e83aa8b0d395dbfb815a8047 /script/provider/provider.lua
parentf06d38754a38ef25bfe5a10b931b596becc092e4 (diff)
downloadlua-language-server-e5a094cfc9ecaaea9873905b37658b9227c8fe99.zip
supports `$/cancelRequest`
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 2b6a1f7c..070652ef 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -805,6 +805,10 @@ proto.on('textDocument/onTypeFormatting', function (params)
return results
end)
+proto.on('$/cancelRequest', function (params)
+ await.close('proto:' .. params.id)
+end)
+
proto.on('$/requestHint', function (params)
local core = require 'core.hint'
if not config.get 'Lua.hint.enable' then