diff options
-rw-r--r-- | main.lua | 8 | ||||
-rw-r--r-- | script/provider/formatting.lua | 6 |
2 files changed, 13 insertions, 1 deletions
@@ -68,6 +68,14 @@ log.info('LOGPATH:', LOGPATH) log.info('METAPATH:', METAPATH) log.info('VERSION:', version.getVersion()) +local stdRequire = require +require = function (name) + if name == 'code_format' then + error('cannot found code_format') + end + return stdRequire(name) +end + require 'tracy' require 'cli' 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' |