diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-06-05 13:48:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 13:48:46 +0800 |
commit | 7d3e09d8c3ffd2c6ffd597e54510be2c12970355 (patch) | |
tree | 843fb532d1f999266992f34b66fffc60c583f4a3 | |
parent | e2ca72dd54da1cafda36ff9e1266526fec54081f (diff) | |
parent | 87581bec1983083426e9fa7e5b157be969edf40d (diff) | |
download | lua-language-server-7d3e09d8c3ffd2c6ffd597e54510be2c12970355.zip |
Merge pull request #2692 from folke/workspace_reload
don't do diagnostics when workspace is not ready
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/provider/diagnostic.lua | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md index 315fa729..80052eb2 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased <!-- Add all new changes here. They will be moved under a version at release --> +* `FIX` Don't do diagnostics when the workspace is not ready * `NEW` Reference workspace symbols in comments using `[some text](lua://symbolName)` syntax ## 3.9.0 diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index 37c88bb6..c52c7e89 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -246,6 +246,9 @@ local function isValid(uri) if not config.get(uri, 'Lua.diagnostics.enable') then return false end + if not ws.isReady(uri) then + return false + end if files.isLibrary(uri, true) then local status = config.get(uri, 'Lua.diagnostics.libraryFiles') if status == 'Disable' then |