summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2022-01-19 16:10:51 +0800
committerCppCXY <812125110@qq.com>2022-01-19 16:10:51 +0800
commit53b4c03fb2e7aa4969b5a1fd712686bad9548131 (patch)
tree9025b760ab47191bcffee8abfe20aaf2c1d5af60 /make
parent2f984c1a2baf162f72240ca7b7f3f530459a71f4 (diff)
downloadlua-language-server-53b4c03fb2e7aa4969b5a1fd712686bad9548131.zip
提交代码格式化
Diffstat (limited to 'make')
-rw-r--r--make/code_format.lua23
-rw-r--r--make/modules.cpp4
2 files changed, 27 insertions, 0 deletions
diff --git a/make/code_format.lua b/make/code_format.lua
new file mode 100644
index 00000000..11b97e4a
--- /dev/null
+++ b/make/code_format.lua
@@ -0,0 +1,23 @@
+local lm = require 'luamake'
+
+lm:source_set 'code_format' {
+ rootdir = '../3rd/EmmyLuaCodeStyle',
+ includes = {
+ "include",
+ "../bee.lua/3rd/lua"
+ },
+ sources = {
+ -- codeFormatLib
+ "CodeFormatLib/src/*.cpp",
+ -- LuaParser
+ "LuaParser/src/*.cpp",
+ "LuaParser/src/LuaAstNode/LuaAstNode.cpp",
+ -- Util
+ "Util/src/StringUtil.cpp",
+ "Util/src/Utf8.cpp",
+ --CodeService
+ "CodeService/src/*.cpp",
+ "CodeService/src/FormatElement/*.cpp",
+ "CodeService/src/NameStyle/*.cpp"
+ }
+}
diff --git a/make/modules.cpp b/make/modules.cpp
index f72fc058..8fe065a8 100644
--- a/make/modules.cpp
+++ b/make/modules.cpp
@@ -2,3 +2,7 @@
extern "C" int luaopen_lpeglabel (lua_State *L);
static ::bee::lua::callfunc _init(::bee::lua::register_module, "lpeglabel", luaopen_lpeglabel);
+
+extern "C" int luaopen_code_format(lua_State *L);
+static ::bee::lua::callfunc _init_code_format(::bee::lua::register_module, "code_format",
+ luaopen_code_format);