From 7dbf3b17be4b46264e843401134cd64e6bca4873 Mon Sep 17 00:00:00 2001 From: JuanZoran <1430359574@qq.com> Date: Sat, 4 Mar 2023 22:46:57 +0800 Subject: [PATCH] refactor: better source code framework --- lua/Trans/README.md | 8 ++++++++ lua/Trans/{query => backend}/baidu.lua | 0 lua/Trans/{query => backend}/offline.lua | 0 lua/Trans/{query => backend}/youdao.lua | 0 lua/Trans/{view => frontend}/float.lua | 0 lua/Trans/{view => frontend}/hover.lua | 0 lua/Trans/{ui => style}/spinner.lua | 0 lua/Trans/{ui => style}/theme.lua | 0 lua/Trans/{ => util}/node.lua | 0 lua/Trans/{ => wrapper}/buffer.lua | 0 lua/Trans/{ => wrapper}/window.lua | 0 11 files changed, 8 insertions(+) create mode 100644 lua/Trans/README.md rename lua/Trans/{query => backend}/baidu.lua (100%) rename lua/Trans/{query => backend}/offline.lua (100%) rename lua/Trans/{query => backend}/youdao.lua (100%) rename lua/Trans/{view => frontend}/float.lua (100%) rename lua/Trans/{view => frontend}/hover.lua (100%) rename lua/Trans/{ui => style}/spinner.lua (100%) rename lua/Trans/{ui => style}/theme.lua (100%) rename lua/Trans/{ => util}/node.lua (100%) rename lua/Trans/{ => wrapper}/buffer.lua (100%) rename lua/Trans/{ => wrapper}/window.lua (100%) diff --git a/lua/Trans/README.md b/lua/Trans/README.md new file mode 100644 index 0000000..93d2545 --- /dev/null +++ b/lua/Trans/README.md @@ -0,0 +1,8 @@ +# TODO + + +- [TODO](#todo) + + +- [ ] Refactor query engine to 'Backend' and 'Frontend' +- [ ] Use `Trans.install` instead of `install.sh` diff --git a/lua/Trans/query/baidu.lua b/lua/Trans/backend/baidu.lua similarity index 100% rename from lua/Trans/query/baidu.lua rename to lua/Trans/backend/baidu.lua diff --git a/lua/Trans/query/offline.lua b/lua/Trans/backend/offline.lua similarity index 100% rename from lua/Trans/query/offline.lua rename to lua/Trans/backend/offline.lua diff --git a/lua/Trans/query/youdao.lua b/lua/Trans/backend/youdao.lua similarity index 100% rename from lua/Trans/query/youdao.lua rename to lua/Trans/backend/youdao.lua diff --git a/lua/Trans/view/float.lua b/lua/Trans/frontend/float.lua similarity index 100% rename from lua/Trans/view/float.lua rename to lua/Trans/frontend/float.lua diff --git a/lua/Trans/view/hover.lua b/lua/Trans/frontend/hover.lua similarity index 100% rename from lua/Trans/view/hover.lua rename to lua/Trans/frontend/hover.lua diff --git a/lua/Trans/ui/spinner.lua b/lua/Trans/style/spinner.lua similarity index 100% rename from lua/Trans/ui/spinner.lua rename to lua/Trans/style/spinner.lua diff --git a/lua/Trans/ui/theme.lua b/lua/Trans/style/theme.lua similarity index 100% rename from lua/Trans/ui/theme.lua rename to lua/Trans/style/theme.lua diff --git a/lua/Trans/node.lua b/lua/Trans/util/node.lua similarity index 100% rename from lua/Trans/node.lua rename to lua/Trans/util/node.lua diff --git a/lua/Trans/buffer.lua b/lua/Trans/wrapper/buffer.lua similarity index 100% rename from lua/Trans/buffer.lua rename to lua/Trans/wrapper/buffer.lua diff --git a/lua/Trans/window.lua b/lua/Trans/wrapper/window.lua similarity index 100% rename from lua/Trans/window.lua rename to lua/Trans/wrapper/window.lua