commit eaffb50f5871b591044eb7ae231a95a47e878291
parent 5c87c2f74b79973f6b7ed0d2177872117635b52c
Author: Thomas Vigouroux <me@vigoux.eu>
Date: Wed, 6 Mar 2024 08:14:50 +0100
refactor: simplify running commands in plugin directory
Diffstat:
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -87,18 +87,22 @@ add "vigoux/ltex-ls.nvim"
add { source = 'https://git.sr.ht/~vigoux/complementree.nvim' }
add { source = 'https://git.sr.ht/~vigoux/architext.nvim' }
-function azy_build_lib(data)
- local finished = false
- vim.system({ "make", "lib" }, {
- cwd = data.path,
- }, function()
- finished = true
- end)
- vim.wait(10000, function()
- return finished
- end)
+local function run_cmd(cmd)
+ return function(data)
+ local finished = false
+ vim.system(cmd, {
+ cwd = data.path
+ }, function()
+ finished = true
+ end)
+ vim.wait(10000, function()
+ return finished
+ end)
+ end
end
+local azy_build_lib = run_cmd { "make", "lib" }
+
add {
source = 'https://git.sr.ht/~vigoux/azy.nvim',
hooks = {