From 87581bec1983083426e9fa7e5b157be969edf40d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 4 Jun 2024 18:54:16 +0200 Subject: [PATCH] don't do diagnostics when workspace is not ready --- changelog.md | 1 + script/provider/diagnostic.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 315fa729a..80052eb24 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `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 37c88bb67..c52c7e895 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