neovim plugin with utilities I commonly use.
-
Run a system command asynchronously and display output to separated window in one batch
local cmd = require("gubbins.cmd") local waitcompletion = true cmd.run({ "node", "example/ls.js", "--slow" }, true, waitcompletion, nil, nil)
batch.webm.mov
-
Run a system command asynchronously and display output line by line.
local cmd = require("gubbins.cmd") local waitcompletion = false cmd.run({ "node", "example/ls.js", "--slow" }, true, waitcompletion, nil, nil)
linebyline.webm.mov
See ui/README.md
Common usage consists of running command on keymap. Here's an example:
-- .config/lua/after/gubbins.lua
local cmd = require("gubbins.cmd")
local list_files = function()
cmd.run({ "ls", "-l", "-h" }, true, false, nil, function(buf, win)
vim.api.nvim_buf_set_keymap(buf, "n", "<CR>", "", {
noremap = true,
silent = true,
callback = function()
vim.api.nvim_win_close(win, false)
end,
})
end)
end
vim.keymap.set("n", "<leader>lfs", list_files)
With packer:
use(
"sondalex/gubbins.nvim"
})
ldoc lua/
./tests/run