aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/scratchs/sample.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/alpha/scratchs/sample.lua')
-rw-r--r--lua/alpha/scratchs/sample.lua22
1 files changed, 22 insertions, 0 deletions
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, {})