chore: reformat with stylua 0.14.0

This commit is contained in:
Simon Hauser
2022-07-07 08:27:46 +02:00
parent 8fe2dde656
commit f838695459
12 changed files with 1016 additions and 954 deletions

View File

@@ -45,28 +45,26 @@ utils.job_maker = function(cmd, bufnr, opts)
end
end)()
Job
:new({
command = command,
args = cmd,
env = opts.env,
cwd = opts.cwd,
writer = writer,
on_exit = vim.schedule_wrap(function(j)
if not vim.api.nvim_buf_is_valid(bufnr) then
return
end
if opts.mode == "append" then
vim.api.nvim_buf_set_lines(bufnr, -1, -1, false, j:result())
elseif opts.mode == "insert" then
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, j:result())
end
if opts.callback then
opts.callback(bufnr, j:result())
end
end),
})
:start()
Job:new({
command = command,
args = cmd,
env = opts.env,
cwd = opts.cwd,
writer = writer,
on_exit = vim.schedule_wrap(function(j)
if not vim.api.nvim_buf_is_valid(bufnr) then
return
end
if opts.mode == "append" then
vim.api.nvim_buf_set_lines(bufnr, -1, -1, false, j:result())
elseif opts.mode == "insert" then
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, j:result())
end
if opts.callback then
opts.callback(bufnr, j:result())
end
end),
}):start()
else
if opts.callback then
opts.callback(bufnr)