From fff083a9fba887fae4e0fa6f048e294c770715fb Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 5 Sep 2024 05:16:18 +0200 Subject: [PATCH] feat: add build.lua to auto download native on lazy --- lua/codemp/build.lua | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lua/codemp/build.lua diff --git a/lua/codemp/build.lua b/lua/codemp/build.lua new file mode 100644 index 0000000..f89b856 --- /dev/null +++ b/lua/codemp/build.lua @@ -0,0 +1,4 @@ +local plugin_dir = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h") -- got this from https://lazy.folke.io/developers#building +local native_path = plugin_dir .. "/native.so" -- TODO get extension based on platform +local download_url = "https://codemp.dev/releases/lua/codemp_native-linux.so" -- TODO get url based on platform +vim.system({"curl", "-s", "-o", native_path, download_url }) -- TODO can we run this asynchronously?