diff options
author | Gowa2017 <33367355+Gowa2017@users.noreply.github.com> | 2021-12-29 16:57:16 +0800 |
---|---|---|
committer | Gowa2017 <33367355+Gowa2017@users.noreply.github.com> | 2021-12-29 16:57:16 +0800 |
commit | 84cc2673c8b84b162b00f59159e1ec9db2dc1f0d (patch) | |
tree | fc59396a792e86e2744e1659594a6724b8901069 | |
parent | 9cd3f3ac69b3447f71ee74d49eb801ebd66a433e (diff) | |
parent | 647a225f4b95d8fddc47d151261c52851b3eb9f2 (diff) | |
download | lua-language-server-84cc2673c8b84b162b00f59159e1ec9db2dc1f0d.zip |
Merge remote-tracking branch 'upstream/master'
m--------- | 3rd/bee.lua | 0 | ||||
m--------- | 3rd/luamake | 0 | ||||
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/proto/proto.lua | 7 | ||||
-rw-r--r-- | script/provider/provider.lua | 4 | ||||
-rw-r--r-- | script/workspace/workspace.lua | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/3rd/bee.lua b/3rd/bee.lua -Subproject 9132c7ecb4a68c40d52a6d750308237bf054feb +Subproject 2ea871bfaa2ecf1be94d610048980f05e44782c diff --git a/3rd/luamake b/3rd/luamake -Subproject 637ca44922ac125ceaebfb53650e4d7c6ae9247 +Subproject 94a91fd465d8c86a5341069ceef1018d9035b5a diff --git a/changelog.md b/changelog.md index 6f1d640b..73541ac0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 2.5.7 +* `FIX` [#879](https://github.com/sumneko/lua-language-server/issues/879) + ## 2.5.6 `2021-12-27` * `CHG` diagnostic: now syntax errors in `LuaDoc` are shown as `Warning` diff --git a/script/proto/proto.lua b/script/proto/proto.lua index 7cdc461c..a73e462e 100644 --- a/script/proto/proto.lua +++ b/script/proto/proto.lua @@ -154,7 +154,7 @@ function m.doMethod(proto) local response <close> = function () local passed = os.clock() - clock if passed > 0.2 then - log.debug(('Method [%s] takes [%.3f]sec.'):format(method, passed)) + log.debug(('Method [%s] takes [%.3f]sec. %s'):format(method, passed, util.dump(proto))) end --log.debug('Finish method:', method) if not proto.id then @@ -164,7 +164,7 @@ function m.doMethod(proto) if ok then m.response(proto.id, res) else - m.responseErr(proto.id, proto._closeReason or define.ErrorCodes.InternalError, res) + m.responseErr(proto.id, proto._closeReason or define.ErrorCodes.InternalError, proto._closeMessage or res) end end ok, res = xpcall(abil, log.error, proto.params) @@ -172,12 +172,13 @@ function m.doMethod(proto) end) end -function m.close(id, reason) +function m.close(id, reason, message) local proto = m.holdon[id] if not proto then return end proto._closeReason = reason + proto._closeMessage = message await.close('proto:' .. id) end diff --git a/script/provider/provider.lua b/script/provider/provider.lua index addfe320..df2a95f2 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -918,7 +918,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 } @@ -1021,7 +1021,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 diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index cb6b140e..49d158c1 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -297,7 +297,7 @@ function m.awaitLoadFile(uri) local nativeLoader = loadFileFactory(m.path, progressData) local native = m.getNativeMatcher() if native then - log.info('Scan files at:', m.path) + log.info('Scan files at:', furi.decode(uri)) native:scan(furi.decode(uri), nativeLoader) end end |