From 67f55ef388b18310c06219eb3207ba513673127a Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Fri, 5 Aug 2022 09:02:11 +0200 Subject: add temporary laravel plugin scratch --- lua/alpha/scratchs/sample.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lua/alpha/scratchs/sample.lua (limited to 'lua/alpha/scratchs/sample.lua') diff --git a/lua/alpha/scratchs/sample.lua b/lua/alpha/scratchs/sample.lua new file mode 100644 index 0000000..052f9dd --- /dev/null +++ b/lua/alpha/scratchs/sample.lua @@ -0,0 +1,22 @@ +vim.api.nvim_create_user_command("Sailup", function () + vim.fn.jobstart( + {"sail", "up", "-d"}, + { + stdout_buffered = true, + stderr_buffered = true, + on_exit = function () + require("notify").notify("Sail up is done", "info", {}) + end, + on_stdout = function (_, data) + if data then + P(data) + end + end, + on_stderr = function (_, data) + if data then + P(data) + end + end, + } + ) +end, {}) -- cgit v1.2.3