diff --git a/changelog.md b/changelog.md index 1654f2e98..d93a3008e 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ * `FIX` [#1368](https://github.com/sumneko/lua-language-server/issues/1368) * `FIX` [#1370](https://github.com/sumneko/lua-language-server/issues/1370) * `FIX` [#1375](https://github.com/sumneko/lua-language-server/issues/1375) +* `FIX` [#1391](https://github.com/sumneko/lua-language-server/issues/1391) ## 3.5.0 `2022-7-19` diff --git a/script/library.lua b/script/library.lua index b3b90933d..57aac066f 100644 --- a/script/library.lua +++ b/script/library.lua @@ -504,6 +504,10 @@ local function check3rd(uri) if not config.get(uri, 'Lua.workspace.checkThirdParty') then return end + local scp = scope.getScope(uri) + if not scp:get 'canCheckThirdParty' then + return + end local thirdConfigs = load3rdConfig(uri) or false if not thirdConfigs then return @@ -515,6 +519,7 @@ end local function check3rdOfWorkspace(suri) local scp = scope.getScope(suri) scp:set('thirdConfigsCache', nil) + scp:set('canCheckThirdParty', true) local id = 'check3rdOfWorkspace:' .. scp:getName() await.close(id) ---@async