diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-30 15:25:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-30 15:25:56 +0800 |
commit | f0f9a4ea4509dfb764a5dfebd5e86e679c8f4b03 (patch) | |
tree | 5e2c7fcd5acb1598d4398f29a6d48c4e4d834be8 /script/provider | |
parent | 789cb1598a53c615164a5df7a1c4056f7d4130eb (diff) | |
parent | 820aa1a56a8a4bdd8fc7098b1e7cff5dd190b2eb (diff) | |
download | lua-language-server-f0f9a4ea4509dfb764a5dfebd5e86e679c8f4b03.zip |
Merge remote-tracking branch 'origin/master' into multi-workspace
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/provider.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 11501b9c..51a10b19 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -252,6 +252,9 @@ m.register 'textDocument/hover' { abortByFileUpdate = true, ---@async function (params) + if not config.get('Lua.hover.enable') then + return + end local doc = params.textDocument local uri = files.getRealUri(doc.uri) if not workspace.isReady() then @@ -939,7 +942,7 @@ m.register 'textDocument/onTypeFormatting' { m.register '$/cancelRequest' { function (params) - proto.close(params.id, define.ErrorCodes.RequestCancelled) + proto.close(params.id, define.ErrorCodes.RequestCancelled, 'Request cancelled.') end } @@ -1042,7 +1045,7 @@ files.watch(function (ev, uri) for id, p in pairs(proto.holdon) do if m.attributes[p.method].abortByFileUpdate then log.debug('close proto(ContentModified):', id, p.method) - proto.close(id, define.ErrorCodes.ContentModified) + proto.close(id, define.ErrorCodes.ContentModified, 'Content modified.') end end end |