-
-
Notifications
You must be signed in to change notification settings - Fork 374
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
can not format any file
try require code_format
failed when require provide.formatting
,because main.lua disable require code_format
local stdRequire = require
require = function (name)
if name == 'code_format' then
error('cannot found code_format')
end
return stdRequire(name)
end
debug
language-server, we can see package['provider.formatting'] type is boolean
script/provider/provider.lua:1036: attempt to index a boolean value (local 'pformatting')
stack traceback:
[C]: in function 'xpcall'
script/proto/proto.lua:184: in function <script/proto/proto.lua:159>
[Error - 10:12:26 AM] Request textDocument/formatting failed.
Message: [10:12:26.471][error][#0]: script/provider/provider.lua:1036: attempt to index a boolean value (local 'pformatting')
stack traceback:
[C]: in function 'xpcall'
script/proto/proto.lua:184: in function <script/proto/proto.lua:159>
Code: -32603
Environment (please complete the following information):
- OS: macOS
- Is WSL remote? no
- Client: VSCODE
Provide logs
file_Users_apple_apisix.log
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working