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/formatting.lua | |
parent | c700a5fc23e00f95166e883764276a6f61803d4e (diff) | |
download | lua-language-server-8da719f8c063b7b8f8a99d1e98201e44a13fab1f.zip |
fix wront indent of VSCode
Diffstat (limited to 'script/core/formatting.lua')
-rw-r--r-- | script/core/formatting.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/core/formatting.lua b/script/core/formatting.lua index fb5ca9c7..de7f30ed 100644 --- a/script/core/formatting.lua +++ b/script/core/formatting.lua @@ -1,8 +1,11 @@ -local codeFormat = require("code_format") local files = require("files") local log = require("log") return function(uri, options) + local suc, codeFormat = pcall(require, "code_format") + if not suc then + return + end local text = files.getOriginText(uri) local state = files.getState(uri) if not state then |