From a6eb3f300d3237fa111e30fa21b5084ed7636327 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Thu, 11 Aug 2022 08:39:41 +0200 Subject: updates on libraries --- lua/alpha/scratchs/sample.lua | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'lua/alpha/scratchs/sample.lua') diff --git a/lua/alpha/scratchs/sample.lua b/lua/alpha/scratchs/sample.lua index 052f9dd..a2d783e 100644 --- a/lua/alpha/scratchs/sample.lua +++ b/lua/alpha/scratchs/sample.lua @@ -1,22 +1,12 @@ -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, {}) +local scandir = require("plenary.scandir") + + + +local dirs = scandir.scan_dir( + { "/home/alpha/code/php" }, + { depth = 1, only_dirs = true } +) + +for _, dir in ipairs(dirs) do + P(vim.fs.basename(dir)) +end -- cgit v1.2.3