From c1594800ff24f93af481eadac77add4ffdba1fb7 Mon Sep 17 00:00:00 2001 From: Chev Date: Tue, 31 Dec 2024 22:28:56 -0700 Subject: [PATCH] feat(nvim): Pipe README update script output to vim.notify. --- nvim/lua/plugins/lazy.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nvim/lua/plugins/lazy.lua b/nvim/lua/plugins/lazy.lua index 0c91b1f..c23afdc 100644 --- a/nvim/lua/plugins/lazy.lua +++ b/nvim/lua/plugins/lazy.lua @@ -6,7 +6,18 @@ return { vim.api.nvim_create_autocmd("User", { pattern = "LazySync", callback = function() - os.execute("bun $HOME/.dotfiles/update-readme.ts") + local handle = io.popen("bun $HOME/.dotfiles/update-readme.ts") + if handle then + local result = handle:read("*a") + handle:close() + if result then + vim.notify(result, vim.log.levels.INFO) + else + vim.notify("Failed to read output from command", vim.log.levels.ERROR) + end + else + vim.notify("Failed to execute command", vim.log.levels.ERROR) + end end, }) end,