summaryrefslogtreecommitdiff
path: root/script/provider/formatting.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/provider/formatting.lua')
-rw-r--r--script/provider/formatting.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/provider/formatting.lua b/script/provider/formatting.lua
index f73b0dc0..73b6608d 100644
--- a/script/provider/formatting.lua
+++ b/script/provider/formatting.lua
@@ -1,4 +1,8 @@
-local codeFormat = require 'code_format'
+local suc, codeFormat = pcall(require, 'code_format')
+if not suc then
+ return
+end
+
local ws = require 'workspace'
local furi = require 'file-uri'
local fs = require 'bee.filesystem'