diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-08-11 08:39:41 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-08-11 08:39:41 +0200 |
| commit | a6eb3f300d3237fa111e30fa21b5084ed7636327 (patch) | |
| tree | ca893f2a6d3e304152f872ce9181dfb5d9a7b2a9 /lua/alpha/scratchs/sample.lua | |
| parent | f61af678dd5da523340c71f57eb95d8d8a76d780 (diff) | |
| download | nvim-conf-a6eb3f300d3237fa111e30fa21b5084ed7636327.tar.gz nvim-conf-a6eb3f300d3237fa111e30fa21b5084ed7636327.zip | |
updates on libraries
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 |