Skip to content

Commit

Permalink
Merge pull request #2692 from folke/workspace_reload
Browse files Browse the repository at this point in the history
don't do diagnostics when workspace is not ready
  • Loading branch information
sumneko authored Jun 5, 2024
2 parents e2ca72d + 87581be commit 7d3e09d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions script/provider/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d3e09d

Please sign in to comment.