diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-08-29 20:03:23 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-08-29 20:03:23 +0800 |
commit | 8da719f8c063b7b8f8a99d1e98201e44a13fab1f (patch) | |
tree | f4c1c6949a8f33a011321c3511d190e4cc6a6792 /script/core/diagnostics/codestyle-check.lua | |
parent | c700a5fc23e00f95166e883764276a6f61803d4e (diff) | |
download | lua-language-server-8da719f8c063b7b8f8a99d1e98201e44a13fab1f.zip |
fix wront indent of VSCode
Diffstat (limited to 'script/core/diagnostics/codestyle-check.lua')
-rw-r--r-- | script/core/diagnostics/codestyle-check.lua | 6 |
1 files changed, 5 insertions, 1 deletions
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) |