diff options
Diffstat (limited to 'script/provider/provider.lua')
-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 |