diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-17 17:22:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-17 17:22:42 +0800 |
commit | 2862d7cd292927b608523f5b8ede49c227e7065c (patch) | |
tree | 53eb0a3e46f34231f7937a7ff33c10cf14a55e3d | |
parent | e67dd05a15a76d9ee6addb6519fd98e6527d2b09 (diff) | |
parent | 6a26535292674b2cfb683b8b66425b5a79caf4e1 (diff) | |
download | lua-language-server-2862d7cd292927b608523f5b8ede49c227e7065c.zip |
Merge commit '6a26535292674b2cfb683b8b66425b5a79caf4e1' into 2.0.0
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | changelog.md | 5 | ||||
-rw-r--r-- | script/config.lua | 2 | ||||
-rw-r--r-- | script/core/guide2.lua | 8 |
4 files changed, 13 insertions, 3 deletions
@@ -131,6 +131,7 @@ Please [help me][en-US] improve the quality of `en-US`. * [火凌之](https://github.com/PhoenixZeng) * [CppCXY](https://github.com/CppCXY) * [Ketho](https://github.com/Ketho) +* [Folke Lemaitre](https://github.com/folke) ## Telemetry diff --git a/changelog.md b/changelog.md index 213f776a..33ae1bb5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # changelog +## 1.21.3 +`2021-6-17` +* `NEW` supports `untrusted workspaces` +* `FIX` performance issues, thanks to [folke](https://github.com/folke) + ## 1.21.2 `2021-5-18` * `FIX` loaded new file with ignored filename diff --git a/script/config.lua b/script/config.lua index 97df7c17..50aab037 100644 --- a/script/config.lua +++ b/script/config.lua @@ -131,7 +131,7 @@ local ConfigTemplate = { meta = {'${version} ${language}', String}, unicodeName = {false, Boolean}, nonstandardSymbol = {{}, Str2Hash ';'}, - plugin = {'.vscode/lua/plugin.lua', String}, + plugin = {'', String}, fileEncoding = {'utf8', String}, builtin = {{}, Hash(String, String)}, }, diff --git a/script/core/guide2.lua b/script/core/guide2.lua index 576c0c20..183555b3 100644 --- a/script/core/guide2.lua +++ b/script/core/guide2.lua @@ -3021,7 +3021,7 @@ function m.searchSameFields(status, simple, mode) locks[start] = lock end if lock[obj] then - return + return false end lock[obj] = true queueLen = queueLen + 1 @@ -3037,13 +3037,17 @@ function m.searchSameFields(status, simple, mode) forces[queueLen] = force end end + return true end local function pushQueue(obj, start, force) if obj.type == 'getlocal' or obj.type == 'setlocal' then obj = obj.node end - appendQueue(obj, start, force) + if appendQueue(obj, start, force) == false then + -- no need to process the rest if obj is already locked + return + end if obj.type == 'local' and obj.ref then for _, ref in ipairs(obj.ref) do appendQueue(ref, start, force) |