From 8da719f8c063b7b8f8a99d1e98201e44a13fab1f 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, 29 Aug 2022 20:03:23 +0800 Subject: fix wront indent of VSCode --- script/core/diagnostics/codestyle-check.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'script/core/diagnostics/codestyle-check.lua') diff --git a/script/core/diagnostics/codestyle-check.lua b/script/core/diagnostics/codestyle-check.lua index 25603b4b..6448979d 100644 --- a/script/core/diagnostics/codestyle-check.lua +++ b/script/core/diagnostics/codestyle-check.lua @@ -1,5 +1,4 @@ local files = require 'files' -local codeFormat = require 'code_format' local converter = require 'proto.converter' local log = require 'log' local pformatting = require 'provider.formatting' @@ -12,6 +11,11 @@ return function(uri, callback) return end + local suc, codeFormat = pcall(require, 'code_format') + if not suc then + return + end + pformatting.updateConfig(uri) local status, diagnosticInfos = codeFormat.diagnose_file(uri, text) -- cgit v1.2.3