From ea94ae75080956dd49608d2a870f45f4c6ff82d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 20 Jun 2022 16:03:09 +0800 Subject: use preview --- script/core/diagnostics/assign-type-mismatch.lua | 3 +++ script/core/diagnostics/cast-local-type.lua | 3 +++ 2 files changed, 6 insertions(+) (limited to 'script/core') diff --git a/script/core/diagnostics/assign-type-mismatch.lua b/script/core/diagnostics/assign-type-mismatch.lua index 168106a6..aae4cccb 100644 --- a/script/core/diagnostics/assign-type-mismatch.lua +++ b/script/core/diagnostics/assign-type-mismatch.lua @@ -16,6 +16,9 @@ local checkTypes = { ---@async return function (uri, callback) + if not PREVIEW then + return + end local state = files.getState(uri) if not state then return diff --git a/script/core/diagnostics/cast-local-type.lua b/script/core/diagnostics/cast-local-type.lua index ea14ffb6..0a236084 100644 --- a/script/core/diagnostics/cast-local-type.lua +++ b/script/core/diagnostics/cast-local-type.lua @@ -6,6 +6,9 @@ local await = require 'await' ---@async return function (uri, callback) + if not PREVIEW then + return + end local state = files.getState(uri) if not state then return -- cgit v1.2.3