Fix #2343, support pre-commit #3253
Merged
+68
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test file:
test.lua:PS: luarocks.org doesn't support host binary lua module, which means users have to build bee.lua from source code, which will cost long time and easy to fail due to poor network and miss dependencies of libunwind and libbfd. I try to provide a luarocks server and it can be used by:
~/.config/luarocks/config-5.1.lua:The binary module is built in ubuntu, which will not work out of box in other OSes due to some problem like unmatched libbfd version:
So you have to copy a correct
bootstrap:Another problem is luarocks/luarocks#1548 (comment)
/home/wzy/.cache/pre-commit/repopwkmc8b0/lua_env-default/bin/lua-language-serveris a shell wrapper to call/home/wzy/.cache/pre-commit/repopwkmc8b0/lua_env-default/lib/luarocks/rocks-5.1/lua-language-server/scm-1/bin/lua-language-server, which will callbee, however, the dir of/home/wzy/.cache/pre-commit/repopwkmc8b0/lua_env-default/bin/beeis not in$PATH. You can:PATH="/home/wzy/.cache/pre-commit/repopwkmc8b0/lua_env-default/bin${PATH+:}$PATH"to/home/wzy/.cache/pre-commit/repopwkmc8b0/lua_env-default/bin/lua-language-server$PATH'sbee.