We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug can not format any file
try require code_format failed when require provide.formatting,because main.lua disable require code_format
code_format
provide.formatting
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
debug
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):
Provide logs file_Users_apple_apisix.log
The text was updated successfully, but these errors were encountered:
I changed script/main.lua
script/main.lua
local stdRequire = require require = function (name) local ok,result = pcall(stdRequire,name) if not ok and name == 'code_format' then error('cannot found code_format') end return result end
Sorry, something went wrong.
It's a mis-commit, just remove this function
fixed by 885ae3b and a54d265
No branches or pull requests
Describe the bug
can not format any file
try require
code_format
failed when requireprovide.formatting
,because main.lua disable requirecode_format
debug
language-server, we can see package['provider.formatting'] type is booleanEnvironment (please complete the following information):
Provide logs
file_Users_apple_apisix.log
The text was updated successfully, but these errors were encountered: