diff options
Diffstat (limited to 'lua/alpha/scratchs/sample.lua')
| -rw-r--r-- | lua/alpha/scratchs/sample.lua | 34 |
1 files changed, 12 insertions, 22 deletions
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 |